I have created my grid and would like to use default behaviour of the grid to delete a row.
This is my grid setup code:
$(\"#grid\").jqGrid(\'navGrid\',
Probably you should just use JSON.stringify
(from json2.js) inside of serializeDelData
. You don't posted the prototype of your web method DeleteCustomer
which you need to delete, but probably your problem could be fixed with the following code:
serializeDelData: function(postdata) {
return JSON.stringify({customerID: postdata.id});
}
One more common problem in case of the usage of ASMX services. It can be need to define all parameters of the web method called (see here an example).
The usage of ajaxDelOptions: { contentType: "application/json" }
parameter is also required mostly.
It can be helpful to use Fiddler or Firebug to capture and analyse the HTTP traffic.