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 //行中的某个字段
}
});
}
}