easyUI datagrid相关操作总结
程序员文章站
2022-03-07 21:53:25
datagrid自定义全选框function selorUnselData(){if($('#selData').is(':checked')) {machineGrid.datagrid('checkAll');$("#selectLine").text(allLine);} else{machineGrid.datagrid('uncheckAll');$("#selectLine").text(0);}}datagrid删除一行,后面的行标向前一个....
datagrid自定义全选框
function selorUnselData(){
if($('#selData').is(':checked')) {
machineGrid.datagrid('checkAll');
$("#selectLine").text(allLine);
} else{
machineGrid.datagrid('uncheckAll');
$("#selectLine").text(0);
}
}
datagrid删除一行,后面的行标向前一个
//删除操作
function delMachineId(index){
var tip = "确认删除该行吗?";
confirmFunc(tip,function(){
machineGrid.datagrid("deleteRow",index);
var rows = machineGrid.datagrid("getRows");
machineGrid.datagrid("loadData", rows);
});
}
刷新datagrid中某一列数据
function batchEditPassWd(){
textVal = $('#passwd').val();
for (var i = 0; i < passRows.length; i++) {
machineGrid.datagrid("updateRow",{
index:passRowIndex[i], //行索引
row:{
passwd:textVal //行中的某个字段
}
});
}
}
本文地址:https://blog.csdn.net/qq_41554330/article/details/107532343
上一篇: HTML一些标签详解
下一篇: js JSON序列化操作