开发者

Column Value of multiselect rows in jqgrid

Its like I have multiselect option in Jqgrid in which i want to pass the selected rows value to the server and based on the value i will delete the rows. I dont want to have the ids to do my work. For the Single row i get the cell value and delete using the same. But for multi select its not the case. In getGridParam('selar开发者_如何学Pythonrrow'); I use this to fetch the selected rows bu the values are not getting populated. Please help me out in doing the same

When i use the following code as i saw in some sample question i can fetch the value for the single row selection but when i select multiple rows then i pass it says like "FALSE" or "UNDEFINED". What can be the issue. var grid = jQuery('#list'); var sel_id = grid.jqGrid('getGridParam', 'selarrrow'); var myCellData = grid.jqGrid('getCell', sel_id, 'CountryId');


I got this done by using the for loop for getting the selected rows id i did some thing like this and I am able to fetch the value. Thought this might help others too please check it

var myrow;
var id = jQuery("#List").jqGrid('getGridParam','selarrrow');
if(id.length)
{
    for (var i=0;i<id.length;i++)  // For Multiple Delete of row
        {
            myrow = jQuery("#List").jqGrid('getCell',id[i],'ticker'); 
        }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜