My grid data read is configured for use json format. This is the configuration
url:"devitem.json",
mtype: "POST",
datatype: "json",
ajaxGridOptions: {
type : 'post',
async : false,
error : function() { alert('Something bad happened. Stopping');},
},
jsonReader : {
root : "rows",
page : "page",
total : "total",
records : "records",
repeatitems : true,
cell : "cell",
id : "0",
userdata : "userdata",
},
The read request from client send always parameters in this format:
_search=false&nd=1317286048991&rows=25&page=1&sidx=device_id&sord=asc&totalrows=100 How I can convert it to json format ?
I have also set the postData option
postData : JSON.stringify({"dev_post_reqtype":"read","dev_post_devndx":"1","dev_post_reccount":"55"}),
It work but obiuovsly cannot be changed
I have this problem with pager. For testing after change the page number I call this function
function DEVpager_event(pgevent) {
var page = jQuery("#DEVtbl").getGridParam('page');
alert (pgevent+page) ;
// changed devndx for test only
var jdata = JSON.stringify({"dev_post_reqtype":"read","dev_post_devndx":"25","dev_post_reccount":"55"}) ;
jQuery("#DEVtbl").jqGrid('setGridParam', 'postData', jdata); } ;
page is changed with my selection but postData don't change thanks for help