Home  >  Article  >  Web Front-end  >  Datagrid gets index insert column value

Datagrid gets index insert column value

php中世界最好的语言
php中世界最好的语言Original
2018-03-20 10:27:231127browse

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;k

I 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn