检索 jqgrid 复选框列值
尝试检索在 jqgrid 中选中复选框的记录的 id 列。我有下面的代码显示复选框列。
{ name: 'checkbox', index: 'checkbox', formatter: "checkbox", formatoptions: { disabled: false }, editable: true, edittype: "checkbox" }
下面的代码用于编辑选定的 jqgrid 行
jQuery('#list').editRow(id, true, formatEditors);
我的问题是,单击提交/任何按钮后,如何(我不确定是否可以)浏览 jqgrid 中的所有选定记录? 因此,在我的控制器(mvc2)的事件处理程序中,我想访问 jqgrid 中所选记录的所有 id 值。
我还浏览了 asp.net mvc 2 jqgrid add record 并且我可以显示添加按钮,但我无法检索用户选择的行(复选框)
任何帮助将不胜感激,因为我无法找到类似的示例。 提前致谢!
trying to retrieve the id column of records that have their checkboxes selected in a jqgrid. I have the code below displaying the checkbox column.
{ name: 'checkbox', index: 'checkbox', formatter: "checkbox", formatoptions: { disabled: false }, editable: true, edittype: "checkbox" }
and the code below to edit the selected jqgrid row
jQuery('#list').editRow(id, true, formatEditors);
my question is how is it (and I am not sure if it is ) possible to go through all selected records in jqgrid after clicking on submit/any button?
so in an event handler in my controller (mvc2) I want to access all the id values of the records selected in jqgrid.
Also I have gone through the code in asp.net mvc 2 jqgrid add record and I can display the add button but I cannot retrieve the rows selected by the user (checkboxes)
Any help will be greatly appreciated, as I am unable to find a similar example.
Thanks in Advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是我最后总结的答案,
用户还应该创建一个按钮,并在该按钮的 jquery 中添加上述代码,该操作将只是一个在控制器中执行该过程的操作,我希望这会有所帮助!
this is the answer that finaly I put together
the user should also create a button and add the above code in the jquery of that button, the action will be simply an action that does the process in the controller, I hope this helps!