jquery – 从jqGrid检索所选行

我有jqgrid 3.5(全)主要工作.我使用多选项选项检索数据.我无法上班的一部分是获取所选的行. docs状态:

To obtain selected rows we can use getGridParam(‘selarrrow’) method. Using our example we can write this:

jQuery(“#grid_id”).getGridParam(‘selarrrow’);

which will return an array with the selected rows (i.e.,[“11″,”9”] from the figure above). The values in array are the id’s of the selected rows.

这不起作用并返回一个未定义的值(是的,我选择行).我也在我的网格配置中有xmlreader:id设置.

有人可以指点我的方向吗?我已经尝试了我能想到的一切,无济于事.

更新:对于错误的选择器,redsquare是正确的.我的包含的div与网格具有相同的ID,我注意到,当我去检查我的设置代码,并且选择器是表#结果更改,一切正常.感谢所有如果你发布回答redsquare我会接受它,因为这是正确的答案.

解决方法

你可以先检查我的选择器吗?如果它们是正确的,您可以尝试上传您的页面或在jsbin.com上复制问题.

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...