Calling Convention:
datatype : function(postdata) { // do something here }
Datatype functions are supplied with a single object containing the request information (parameter postdata), which normally would have been transformed into GET or POST arguments. This object is compatible with the data: option supplied to the jQuery $.ajax function.
Example:
jQuery("#"+gridid).jqGrid({ ... datatype : function(postdata) { jQuery.ajax({ url:'server.php', data:postdata, dataType:"xml", complete: function(xmldata,stat){ if(stat=="success") { var thegrid = jQuery("#"+gridid")[0]; thegrid.addXmlData(xmldata.responseXML); } } }); }, ... });