easyui datagrid checkbox初始化某几行disabled时,点击全选还是可以选择 解决办法
来源:互联网 发布:c语言判断是否为闰年 编辑:程序博客网 时间:2024/04/29 13:19
$("#body_feetotal").datagrid({ method: "get", pagination: true, singleSelect: false, rownumbers: true, showFooter: true, pageSize: 20, fit: true, toolbar: "#feetotal_toolbar", checkOnSelect: false, fitColumns: false, onLoadSuccess: function(data) { if (data.rows.length > 0) { for (var i = 0; i < data.rows.length; i++) { if (data.rows[i].checkId == "1") { $("input[type='checkbox']")[i + 1].disabled = true; } } } }, onClickRow: function(rowIndex, rowData) { $("#body_feetotal").datagrid("unselectAll"); $("#body_feetotal").datagrid("selectRow", rowIndex); }, onCheck: function(index, row) { $("#body_feetotal").datagrid("unselectAll"); $("#body_feetotal").datagrid("selectRow", index); }, <span style="color:#ff0000;">onCheckAll: function(rows) { $("input[type='checkbox']").each(function(index, el) { console.log(el.disabled) if (el.disabled) { $("#body_feetotal").datagrid('uncheckRow', index - 1);<span style="white-space:pre"></span>//此处参考其他人的代码,原代码为unselectRow } }) },</span> columns: [[ { field: "ck", checkbox: true }, { field: "checkId", title: "复核", multiSort: true, formatter: function(value) { if (value == "1") { return "√"; } else { return ""; } }, halign: "center", align: "center", sortable: true } , { field: "feeNam", title: "费用名称", multiSort: true, halign: "center", sortable: true } , { field: "iEIdNam", title: "进出口标志", multiSort: true, halign: "center", sortable: true }, { field: "cntr", title: "箱号", multiSort: true, halign: "center", sortable: true } , { field: "workWayNam", title: "作业方式", multiSort: true, halign: "center", sortable: true } , { field: "feeTon", title: "计费量", multiSort: true, halign: "center", formatter: function(value) { return HdUtils.formatter.precisionCommon(value, 3); }, align: "right", sortable: true }, { field: "measureUnitNam", title: "计量单位", multiSort: true, halign: "center", sortable: true } , { field: "pileDays", title: "次/天数", multiSort: true, align: "right", halign: "center", formatter: function(value) { return HdUtils.formatter.precisionCommon(value, 2); }, sortable: true } , { field: "feeValue", title: "单价", multiSort: true, halign: "center", align: "right", formatter: function(value) { return HdUtils.formatter.precisionCommon(value, 2); }, sortable: true } , { field: "amount", title: "金额", multiSort: true, halign: "center", align: "right", formatter: function(value) { return HdUtils.formatter.precisionCommon(value, 2); }, sortable: true } , { field: "discountRat", title: "折扣率", multiSort: true, halign: "center", formatter: function(value) { return HdUtils.formatter.precisionCommon(value, 4); }, sortable: true } , { field: "currencyNam", title: "币种代码", multiSort: true, halign: "center", sortable: true } , { field: "abstract", title: "摘要", multiSort: true, halign: "center", sortable: true } , { field: "freeId", title: "免费标志", multiSort: true, formatter: function(value) { if (value == "1") { return "√"; } else { return ""; } }, halign: "center", sortable: true } , { field: "billNo", title: "提单号", multiSort: true, halign: "center", sortable: true } , { field: "shipNam", title: "船名", multiSort: true, halign: "center", sortable: true } , { field: "voyage", title: "航次", multiSort: true, halign: "center", sortable: true } , { field: "feeUnitNam", title: "付费单位", multiSort: true, halign: "center", sortable: true } , { field: "cntrCorpNam", title: "箱公司", multiSort: true, halign: "center", sortable: true } , { field: "insAccount", title: '创建人', multiSort: true, halign: "center", sortable: true } , { field: "insTimestamp", title: '创建时间', multiSort: true, halign: "center", formatter: function(value) { if (value != null && value != undefined) { return new Date(value).format("yyyy-MM-dd hh:mm:ss"); } else { return value; } }, width: 180, sortable: true } , { field: "shipCod", title: "船代码", multiSort: true, halign: "center", sortable: true } ,// {// field: "feeBillNo",// title: "账单号",// multiSort: true,// halign: "center",// sortable: true// }// , { field: "cntrSizCod", title: "尺寸", multiSort: true, halign: "center", sortable: true } , { field: "cntrTypCod", title: "类型", multiSort: true, halign: "center", sortable: true } , { field: "checkNam", title: "复核人", multiSort: true, halign: "center", sortable: true } , { field: "checkDte", title: "复核日期", multiSort: true, halign: "center", formatter: function(value) { if (value != null && value != undefined) { return new Date(value).format("yyyy-MM-dd hh:mm:ss"); } else { return value; } }, width: 180, sortable: true } ]] });
0 2
- easyui datagrid checkbox初始化某几行disabled时,点击全选还是可以选择 解决办法
- easyui datagrid checkbox初始化某几行disabled时,点击全选还是可以选择 解决办法
- easyui datagrid 去掉 全选checkbox
- easyUI 添加CheckBox选择到DataGrid
- datagrid中checkbox全选
- DataGrid +CheckBox(全选)
- 全选checkbox //easyui
- easyui datagrid 控件全选
- 点击行不自动选中checkbox --datagrid easyui
- easyui checkbox checked、disabled属性
- easyui checkbox checked、disabled属性
- easyUI-Datagrid设置checkbox时默认选中
- EasyUI datagrid editor checkbox
- easyui datagrid checkbox
- easyui datagrid checkbox
- DataGrid中CheckBox的全选/取消全选
- DataGrid 的 全选/取消全选 控制(CheckBox)
- DataGrid 的 全选/取消全选 控制(CheckBox)
- win32汇编--创建窗口程序(RadAsm)
- 开源C/C++网络库比较 ace bosst libevent
- Log4J基础详解及示例大全
- sql:SQL Server metadata queries
- 软件盘回车变搜索
- easyui datagrid checkbox初始化某几行disabled时,点击全选还是可以选择 解决办法
- Jump Game
- [前端] jquery+css3实现弹出层中间放大弹出
- 博客迁移通知
- Android高效加载大图、多图解决方案
- java面试题
- 开源日志系统比较:scribe、chukwa、kafka、flume
- [Ubuntu 14.10 Kylin]Ubuntu 软件安装、查找、卸载--apt-get、apt-cache命令安全
- Android Volley完全解析(二),使用Volley加载网络图片