Home > Article > Web Front-end > Datagrid gets index insert column value
This time I will bring you data grid acquisition index insert column value, data grid acquisition index insert column value What are the precautions , the following is a practical case, one Get up and take a look.
Get the index of all selected rows and store them in the arrayary:
var data=$("#dg").datagrid("getSelections"); var ary=[]; for(var i=0;i<data.length;i++){ ary.push($("#dg").datagrid("getRowIndex",data[i])); }
UpdateThe value of a column is calculated for other columns of the row The value obtained after: The value of column money is column amount * unitprice
var data=$("#dg").datagrid("getSelections"); var ary=[]; for(var i=0;i<data.length;i++){ ary.push($("#dg").datagrid("getRowIndex",data[i])); } for(var k=0;kI believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
Recommended reading:
MySQL reset Root password in Mac system
How to convert Json and string to each other
The above is the detailed content of Datagrid gets index insert column value. For more information, please follow other related articles on the PHP Chinese website!