AI智能
改变未来

easyUI datagrid相关操作总结


datagrid自定义全选框 

[code]function selorUnselData(){if($(\'#selData\').is(\':checked\')) {machineGrid.datagrid(\'checkAll\');$(\"#selectLine\").text(allLine);} else{machineGrid.datagrid(\'uncheckAll\');$(\"#selectLine\").text(0);}}

datagrid删除一行,后面的行标向前一个

[code]//删除操作function delMachineId(index){var tip = \"确认删除该行吗?\";confirmFunc(tip,function(){machineGrid.datagrid(\"deleteRow\",index);var rows = machineGrid.datagrid(\"getRows\");machineGrid.datagrid(\"loadData\", rows);});}

刷新datagrid中某一列数据

[code]function batchEditPassWd(){textVal = $(\'#passwd\').val();for (var i = 0; i < passRows.length; i++) {machineGrid.datagrid(\"updateRow\",{index:passRowIndex[i], //行索引row:{passwd:textVal //行中的某个字段}});}}

 

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » easyUI datagrid相关操作总结