[英]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. 就像我在Jqgrid中具有multiselect选项一样,我要将选定的行值传递给服务器,并根据该值删除行。 I dont want to have the ids to do my work.
我不想让IDs做我的工作。 For the Single row i get the cell value and delete using the same.
对于“单行”,我获取单元格值并使用该值删除。 But for multi select its not the case.
但是对于多选,情况并非如此。 In getGridParam('selarrrow');
在getGridParam('selarrrow');中 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". 当我在某些示例问题中看到以下代码时,我可以获取单行选择的值,但是当我选择多行时,则将其传递为“ FALSE”或“ UNDEFINED”。 What can be the issue.
可能是什么问题。 var grid = jQuery('#list');
var grid = jQuery('#list'); var sel_id = grid.jqGrid('getGridParam', 'selarrrow');
var sel_id = grid.jqGrid('getGridParam','selarrrow'); var myCellData = grid.jqGrid('getCell', sel_id, 'CountryId');
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. 我通过使用for循环获取选定的行id来完成此操作,我做了类似的事情,并且能够获取该值。 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');
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.