When submitting the jqGrid form, I want to append '/theRecordId' to the URL, REST style, for the edit use case. This is not working:
jQuery("#noteList").jqGrid('navGrid','#pager',
{addtitle:"Add New Note", clearAfterAdd: true},
{addCaption:"Edit Note", mtype:"PUT"
,onclickSubmit: function(rp_ge, postdata) {
rp_ge.url = editurl + '/' + postdata.id; }
},
{addCaption:"Add New Note", mtype:"POST"},
{},
{},
{}
);
This results in "/[myurl]/undefined" being sent to the server (where [myurl] is the correct initial editurl). So the dynamic url manipulation seems to work, but 'id' is undefined. What should be the name of the 'id' property? I can see that what is being passed as a form parameter is 'id'. I also tried noteId, which is the name it has in the incoming data when displaying the grid, and also what I used for jsonReader.id. Didn't work either. Where should this attribute name come from?