I'm using guriddo jqGrid 5.2.1
I've followed the answers provided to these questions:
- jqGrid: sending edit data
- Add additional param to post data using jqGrid when adding new row with modal form
- How to post variable data with editData or onclickSubmit in jqgrid
But the editData I've defined is not getting sent to the endpoint.
Here is the code in my jqgrid pager definition:
$('#jqGrid').navGrid('#jqGridPager',
// the buttons to appear on the toolbar of the grid
{ edit: true,
add: true,
del: true,
search: false,
refresh: false,
view: false,
position: "left",
cloneToTop: false,
mtype: 'POST',
editData: {
mediaPlanId : function() { return mpId; }
}},
// options for the Edit Dialog
{
editCaption: "Edit Item",
recreateForm: true,
checkOnUpdate : true,
checkOnSubmit : true,
closeAfterEdit: true,
errorTextFormat: function (data) {
return 'Error: ' + data.responseText;
}
},
// options for the Add Dialog
{
closeAfterAdd: true,
recreateForm: true,
errorTextFormat: function (data) {
return 'Error: ' + data.responseText;
}
},
// options for the Delete Dailog
{
errorTextFormat: function (data) {
return 'Error: ' + data.responseText;
}
}
);
mpId is defined outside of the jqGrid and jqGridPager functions, at the page level. I tried sending a value of 1, but that doesn't work either. I suspect I've missed something simple, but I can't figure out what.