easyUI----grid
1.设置标题行高
.datagrid-header-row td{background-color:rgb(15,185,234);color:#fff;height:35px ;font-size:14pt;font-family:"Microsoft Yahei",Verdana,Simsun,"Segoe UI Web Light","Segoe UI Light","Segoe UI Web Regular","Segoe UI","Segoe UI Symbol","Helvetica Neue",Arial }
2.设置内容行高
.datagrid-row { height: 32px; }
3.同步行和checkBox点击事件
function initGrid(taskTypeId){
$("#bt_buttion1").attr("class","tlbtn2 btndisabled");
$("#bt_buttion2").attr("class","tlbtn2 btndisabled");
$('#assctlgDiv').empty();
$('#assctlgDiv').datagrid({
url:"/../gridData.do?taskTypeId="+taskTypeId,
fitColumns : true,
fit : true,
checkbox : true,
rownumbers:true,
columns :[[
{
field : '',
title : '单选',
align : 'center',
checkbox : true
},
{
field : 'bgtstage',
title : 'AAA',
halign:'center',
align : 'left',
width : '24%',
formatter:function(value , record , index){
if(value == 0){
return '<span style=color:red; >A</span>' ;
} else if( value == 1){
return '<span style=color:green; >B</span>' ;
} else if( value == 2){
return '<span style=color:blue; >C</span>' ;
}
}
}, {
field : 'confirmtime',
title : 'BBBB',
halign:'center',
align : 'left',
width : '24%',
formatter:function(value , record , index){
if(value == ""){
return '<span>AAA</span>' ;
}else{
return value;
}
}
}]],
onSelect: function () //选中一行
{
toolblock();
},
onUnselect:function ()
{
toolblock();
},
onSelectAll:function ()
{
toolblock();
},
onUnselectAll:function ()
{
$("#bt_buttion1").attr("class","tlbtn2 btndisabled");
$("#bt_buttion2").attr("class","tlbtn2 btndisabled");
}
});
};
function toolblock(){
var rows = $('#assctlgDiv').datagrid('getSelections');
var count = 0 ;
var count1 = 0 ;
$.each(rows, function (index, row) {
if(row.bgtstage=="0"){
count=count+1;
};
if(row.bgtstage=="1"){
count1=count1+1;
};
});
if(rows.length==count&&count>0){
$("#bt_buttion1").attr("class","tlbtn2");
}else if(rows.length==count1&&count1>0){
$("#bt_buttion2").attr("class","tlbtn2");
}else{
$("#bt_buttion1").attr("class","tlbtn2 btndisabled");
$("#bt_buttion2").attr("class","tlbtn2 btndisabled");
}
}
easyUI----grid的更多相关文章
- easyui grid 增加合计行
一.首先,easyui grid 的 showfooter 属性设置为 true $aplgrid.datagrid({ data: globalExpenseClaimForm.ExpenseCl ...
- [Easyui - Grid]为easyui的datagrid、treegrid增加表头菜单,用于显示或隐藏列
为easyui的datagrid.treegrid增加表头菜单,用于显示或隐藏列 /** * @author 孙宇 * * @requires jQuery,EasyUI * * 为datagrid. ...
- 动态改变EasyUI grid 列宽和隐藏列
隐藏显示 $('#yourGrid').datagrid('hideColumn','yourColumn'); $('#yourGrid').datagrid('hideColumn','yourC ...
- easyui grid 本地做分页
背景: 有的数据不是很多,但是有分页的需求,这个时候后台往往没有做分页,我们是一次请求了所有的数据. 代码: dataSource 为 grid 里的数据源 html部分: <table id= ...
- easyui grid 里的可编辑text 加清空图标
$.extend($.fn.datagrid.defaults.editors, { text: { init: function (container, options) { var _opt = ...
- easyui -grid每列绑定tooltip
/**用法:*/function doCellTip() { $('#dg').datagrid('doCellTip', { 'max-width': '100px' });} /** * 扩展两个 ...
- easyui grid中翻页多选方法
<table class="easyui-datagrid" title="人员选择" id="dg" data-options=&q ...
- EasyUi Grid以POST方式传送参数绑定
function LoadList() { $("#TableContainer").datagrid({ url: '/HM/ ...
- easy-ui grid里的toobar按钮隐藏与显示
//隐藏第一个按钮$('div.datagrid-toolbar a').eq(0).hide();//隐藏第一条分隔线$('div.datagrid-toolbar div').eq(0).hide ...
- easyui grid单元格类型
在实际应用中可能会碰到不同的需求,比如会根据每行不同的参数或属性设置来设置同列不同的editor类型,这时原有的例子就显的有点太过简单,不能实现我们的需求,现在应用我在项目中的操作为例,显示下实现同列 ...
随机推荐
- linux版本信息以及x86与x86_64的区别
一 x86.x86_64.AMD64 x86是指intel的开发的一种32位指令集,从386开始时代开始的,一直沿用至今,是一种cisc指令集,所有intel早期的cpu,amd早期的cpu都支持这种 ...
- 个人JS体系整理(三)
一. 严格模式 JavaScript 严格模式(strict mode)即在严格的条件下运行.首先声明,严格模式是ES5中提出来的,准确来说就是一句指令Use strict,它的目的是指定代码在严格条 ...
- RDD与DataFrame
RDD:分布式对象集合: 解决了:减少中间计算结果处理所需的开销 数据存在内存,提供一个通用的抽象的数据结构 惰性求值 DataFrame:分布式Row对象集合 服务于:SparkSQL
- Delphi XE8中Android开发有用的资源!
一,FireMonkey Component Library在XE8帮助(topics.chm)中的位置:FireMonkey Component Library,展示了FireMonkey控件在VC ...
- python测试笔试题1
哪一个方法用来返回变量类型? 答案 type 哪一个方法用来列出一个类下的所有属性,方法,以及变量? 答案 dir 字符串方法format是用来去掉字符串的左右空格的么? 答案 不是 python 的 ...
- 题解 P4140 【奇数国 】
题目链接 首先,按照题意,把前$60$个素数打出来$[2$ $-$ $281]$. 因为只有$60$个,再加上本宝宝极其懒得写线性筛于是每一个都$O(\sqrt{n})$暴力筛就好了. 代码如下: # ...
- python操作RabbitMQ、Redis、Memcache、SQLAlchemy
Memcached Memcached 是一个高性能的分布式内存对象缓存系统,用于动态Web应用以减轻数据库负载.它通过在内存中缓存数据和对象来减少读取数据库的次数,从而提高动态.数据库驱动网站的速度 ...
- [Swift实际操作]九、完整实例-(3)创建和安装开发证书、发布证书及开发证书配置文件、发布证书配置文件
本文将为你演示,如何创建开发证书和发布证书,以及其他辅助内容.首先打开浏览器,进入[苹果开发者网站]输入[Apple ID]和[密码],点击登录按钮,进入开发者管理后台. 点击左侧的[Membersh ...
- pip_install的安装
1.下载get-pip.py https://pip.pypa.io/en/latest/installing/#id9 2.运行 python get-pip.py 3.python -m pip ...
- JavaWeb学习笔记(二)—— Tomcat服务器
一.Web开发概述 1.1 Web开发中常见的概念 [B/S系统和C/S系统] Brower/Server:浏览器 服务器 系统 ----- 网站 Client/Server:客户端 服务器 系统 - ...