I need to add an extra dynamic parameter to jqGrid data POSTwhen I add a new record with a modal form.
POST
I tried:
$('#table').setPostData({group: id}); $('#table').setPostDataItem('group', id); $('#table').setGridParam('group', id);
and nothing happened.
you can use editData editGridRow . In most cases, you use editGridRow directly, but using Navigator. In this case, you can define editData as part prmEditor prmAdd navGrid :
prmEdit
prmAdd
$('#table').jqGrid('navGrid','#pager', {/*navGrid options*/}, {/*Edit options*/ editData: { group: function() { return id; } } } });
: serializeEditData, onclickSubmit beforeSubmit. .
POST jqGrid
$j("#listsg11").jqGrid({ url: "/summary_reports", postData: {department:"value1", score_r1:"value2", designation:"value3" }, mtype: 'POST', datatype: "xml", height: 250, width: '100%', .... and so on
( jqGrid) .