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的更多相关文章

  1. easyui grid 增加合计行

    一.首先,easyui  grid 的 showfooter 属性设置为 true $aplgrid.datagrid({ data: globalExpenseClaimForm.ExpenseCl ...

  2. [Easyui - Grid]为easyui的datagrid、treegrid增加表头菜单,用于显示或隐藏列

    为easyui的datagrid.treegrid增加表头菜单,用于显示或隐藏列 /** * @author 孙宇 * * @requires jQuery,EasyUI * * 为datagrid. ...

  3. 动态改变EasyUI grid 列宽和隐藏列

    隐藏显示 $('#yourGrid').datagrid('hideColumn','yourColumn'); $('#yourGrid').datagrid('hideColumn','yourC ...

  4. easyui grid 本地做分页

    背景: 有的数据不是很多,但是有分页的需求,这个时候后台往往没有做分页,我们是一次请求了所有的数据. 代码: dataSource 为 grid 里的数据源 html部分: <table id= ...

  5. easyui grid 里的可编辑text 加清空图标

    $.extend($.fn.datagrid.defaults.editors, { text: { init: function (container, options) { var _opt = ...

  6. easyui -grid每列绑定tooltip

    /**用法:*/function doCellTip() { $('#dg').datagrid('doCellTip', { 'max-width': '100px' });} /** * 扩展两个 ...

  7. easyui grid中翻页多选方法

    <table class="easyui-datagrid" title="人员选择" id="dg" data-options=&q ...

  8. EasyUi Grid以POST方式传送参数绑定

    function LoadList() {            $("#TableContainer").datagrid({                url: '/HM/ ...

  9. easy-ui grid里的toobar按钮隐藏与显示

    //隐藏第一个按钮$('div.datagrid-toolbar a').eq(0).hide();//隐藏第一条分隔线$('div.datagrid-toolbar div').eq(0).hide ...

  10. easyui grid单元格类型

    在实际应用中可能会碰到不同的需求,比如会根据每行不同的参数或属性设置来设置同列不同的editor类型,这时原有的例子就显的有点太过简单,不能实现我们的需求,现在应用我在项目中的操作为例,显示下实现同列 ...

随机推荐

  1. mysql5.6数据库双机热备、主从备份

    主题:mysql5.6数据库双机热备.主从备份 缘由: 在Web应用系统中,数据库性能是导致系统性能瓶颈最主要的原因之一.尤其是在大规模系统中,数据库集群已经成为必备的配置之一.集群的好处主要有:查询 ...

  2. Ubuntu16.04修改静态ip地址

    https://blog.csdn.net/mdw5521/article/details/79270035

  3. C# 筛选Datatable、foreach填充DGV,datatable与datarows转换

    public void SelectFG1(string Nane) { string SetText = "卫材代码 like '%" + Nane + "%' or ...

  4. C#@的用法

    string path = @"C:\Windows\"; // 如果不加 @,编译会提示无法识别的转义序列 // 如果不加 @,可以写成如下 string path2 = &qu ...

  5. 微信AES-128-CBC加密解密

    [TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { var key = "cheaye ...

  6. MQ入门总结(一)消息队列概念和使用场景

    一.消息队列 消息即是信息的载体.为了让消息发送者和消息接收者都能够明白消息所承载的信息(消息发送者需要知道如何构造消息:消息接收者需要知道如何解析消息),它们就需要按照一种统一的格式描述消息,这种统 ...

  7. 类与类之间的两种关系------新标准c++程序设计

    在c++中,类和类之间有两种基本关系:复合关系和继承关系. 复合关系也称为“has a”关系或“有”的关系,表现为封闭类,即一个类以另一个类的对象作为成员变量. 继承关系也称为“is a”关系或“是” ...

  8. 苹果开发者账号提示“Unable to verify mobile phone number”的解决方案

    在注册苹果开发者账号时,会提示:"Unable to verify mobile phone number.".顾名思义,没有有效的手机号码. 解决方案: 进入到Your Appl ...

  9. javascript立即执行函数与模块化

    概念:立即执行函数顾名思义就是函数定义好之后立即执行.函数表达式方式:函数表达式后面加括号()即可立即执行函数. var xmlhttpUtil = function () { function ge ...

  10. 【转】OracleOraDb11g_home1TNSListener服务启动后又停止了

    源地址:https://www.cnblogs.com/Asa-Zhu/p/3819605.html 一.错误描述 登陆PL/SQL Developer登陆本地数据库时先报没有监听程序,查看服务发现O ...