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");
}
}
最新文章
- 11.11光棍节工作心得——github/MVP
- OCJP(1Z0-851) 模拟题分析(一)11
- [问题2014A02] 复旦高等代数 I(14级)每周一题(第四教学周)
- BZOJ 2351 Matrix(哈希)
- SQL操作XML
- 关于Ubuntu下apt的一些用法及和yum的比较
- html学习中
- SDK踩坑全纪录
- Carousel轮播图
- 戏说春秋_i春秋 writeup
- var 全局变量 局部变量
- JavaScript模拟表单(带数组的复杂数据结构)提交
- LeetCode_1. Two Sum_Solution
- cocos2d JS 中的数组拼接与排序
- Eclipse中一个项目调用另一个项目的资源
- git修改文件权限方式
- tp 用group去重
- C# 类库下 读取不到config里节点的问题
- [转载]Linux下getopt()函数的简单使用
- Python之条件判断和循环(入门4)
热门文章
- 《Wonderland: A Novel Abstraction-Based Out-Of-Core Graph Processing System》章明星
- PS插件开发plugin
- 树形DP-----HDU4003 Find Metal Mineral
- 匿名函数和lamda表达式
- 【转】Android系统概览
- JAVA8 Lambda 表达式使用心得
- 入参为json类型的接口测试示例
- Java面向对象之关键字super 入门实例
- [Swift实际操作]九、完整实例-(1)在iTunesConnect网站中创建产品
- python3入门之字符串