Add additional param to post data using jqGrid when adding new row with modal form(在使用模态表单添加新行时使用 jqGrid 添加其他参数以发布数据)
问题描述
当我以模态形式添加新记录时,我需要向 jqGrid 的 POST
数据添加额外的动态参数.
I need to add additional dynamic parameter to jqGrid's POST
data when I'm adding new record with modal form.
我试过了:
$('#table').setPostData({group: id});
$('#table').setPostDataItem('group', id);
$('#table').setGridParam('group', id);
什么都没解决.
推荐答案
你可以使用 的="nofollow noreferrer">editData 参数editGridRow 方法.在大多数情况下,您不直接使用 editGridRow,但使用导航器.在这种情况下,您可以将 editData 定义为部分prmEdit 或 prmAdd
的="nofollow noreferrer">navGrid:
you can use editData parameter of the editGridRow method. In the most cases you use editGridRow not directly, but using Navigator. In the case you can define editData as the part of prmEdit
or prmAdd
of the navGrid:
$('#table').jqGrid('navGrid','#pager',
{/*navGrid options*
本文标题为:在使用模态表单添加新行时使用 jqGrid 添加其他参数以发布数据


基础教程推荐
- 如何在特定日期之前获取消息? 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01