Is there any way to disable jqgrid local cache??? I have a page which you build some filters and based on this params I create the jqgrid.
The problem is that jqgrid doesn't change postdata params! I'm mean, on the second, third, fourth, etc search, the results is always equals the first one. My jqgrid defaults are:
jQuery.extend(jQuery.jgrid.defaults, {
ajaxGridOptions: {
contentType: 'application/json;',
type: "POST",
cache: false,
beforeSend: function () {
$(".loading").show();
}
},
serializeGridData: function (postData) {
return JSON.stringify(postData);
},
datatype: 'json',
autowidth: true,
height: '100%',
rowNum: 10,
rowList: [10, 20, 30],
hidegrid: false,
prmNames: {
search: "isSearch",
nd: null,
rows: "numRows",
page: "numPage",
sort: "orderBy",
order: "orderType"
},
viewrecords: true,
gridComplete: function () {
$(".loading").hide();
},
jsonReader: {
root: function (obj) { return obj.d.rows; },
page: function (obj) { return obj.d.page; },
total: function (obj) { return obj.d.total; },
records: function (obj) { return obj.d.rows.length; },
repeatitems: false
}
});
The jqGrid creation:
$myGrid.jqGrid({
postData: { from: jQuery.parseDate(fromQueryString), to: jQuery.parseDate(toQueryString) },
url: "/Search.aspx/Find",
colNames: ['Test'],
colModel: [
{ name: 'Test', index: 'Test', sortable: false, width: 40 }
],
sortname: "Date",
sortorder: "desc",
jsonReader: { id: "ID" },
pager: "pagerControl",
caption: "Results"
});