如何在创建编辑器函数中获取行索引



我想要我点击的行详细信息,实际上正在使用创建编辑器在网格列中分配下拉列表,我得到了正确的信息,但没有正确获取每行给出相同值的行详细信息,所以我如何获得正确的行详细信息

我使用了这个代码

{
       text: 'Sort Type', dataField: 'aliasname1', columntype: 'dropdownlist', width: '11%', editable: true,
       createeditor: function (row, cellvalue, editor) {                
           var colvalue = $('#shipmentgrid').jqxGrid('getcellvalue', row, 'column');
           var tblvalue = $('#shipmentgrid').jqxGrid('getcellvalue', row, 'table');
           // construct the editor.   
           var requiredfield = ["Ascending", "Descending", "Unsorted"];
           editor.jqxDropDownList({ source: requiredfield, dropDownHeight: '80px', autoDropDownHeight: 0, selectedIndex:-1, checkboxes: true })
       }
},

行的索引作为参数传递 - function(row, ....如果要基于该索引获取行的数据,则可以使用 getrowdata 方法并将行的索引作为参数传递。

最新更新