I used postData to dynamically set request parameters. When I press any external button, I change the URL of the grid and also set some additional parameters in postData , as shown below. It seems that JqGrid adds all these parameters and data for all subsequent queries. Is there a way we can control or avoid sending these parameters every time?
My grid definition:
jQuery(function() { $('#grid').jqGrid({ url: 'rates.html', postData: { name: function() { return $("#name").val(); }, rate: function() { return $("#rate").val(); }, ..... } .... }); });
Here in the mail request: I see that the name , rate parameters go along with other standard jqGrid parameters such as sortname , sidx , rows , etc.
Now, if I click on the external button, if I change the URL of the grid, as shown below
$('#changeReqBtn').click(function() { $('#grid').setGridParam({ url: 'changeReq.html', postData: { msgIds: msgIds } }); $('#grid').trigger("reloadGrid"); });
Now jqGrid sends name , rate, msgIds params
Now, if I change the URL back to rate.html, say, for example, by clicking the refresh icon, jqGrid sends the previous msgIds parameter as well as the previous values. I do not want to send the previous request parameters to a new request when changing the URL. Is there a way we can achieve this?
source share