I do some testing on jquery jqgrid but has problems :
jQuery("#navgrid").jqGrid(
"navGrid",
"#pagernav",
{}, //options
{}, // edit options
{}, // add options
{
afterSubmit : function(response, postdata)
{
if(response.responseText == 'success')
{
console.log(postdata);
alert('success and data should be changed')
console.log(postdata.id);
jQuery("#navgrid").delRowData(postdata.id);
}
else
{
alert('failed and data should not be changed');
}
return true;
},
reloadAfterSubmit: true
}, // del options
{} // search options
);
I do two console.log on firebug for:
postdata => Object { oper="del", id="29"}
postdata.id => 29
Then I got error like this on my firebug:
postdata.split is not a function
toarr = postdata.split(",");
I think I have followed this method : http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods