does (free-) jqGrid provide a callback-function where I can set the postData
before the grid is loaded?
in my case it's pseudo postData
since I am using jqGrid with loadOnce : true
.
I am using the postData
to apply filters to the grid. I load this data by an ajax call.
I want to load all the grid data at once from the server - but then locally apply filters. So when the user changes those filters (for example by using the toolbar-searching/filtering) it just gets applied to the local data.
I have already tried:
beforeInitGrid : function()
{
$("#grid").jqGrid('setGridParam', {
search: true,
postData : {"toolbar":[{"name":"customer","value":"difranco"}],"postdata":{"_search":"true","nd":"1461054190117","rows":"30","page":"1","sidx":"my_date","sord":"asc","totalrows":"10000","filters":"{\"groupOp\":\"AND\",\"rules\":[{\"field\":\"customer\",\"op\":\"cn\",\"data\":\"difranco\"}]}"},"sortname":"my_date","sortorder":"asc","page":"1","rowNum":"30"}
});
}
also with the callback functions: gridComplete
, loadComplete
;
and i tried to set the postData
parameter directly to the jqGrid.
but without reloading with .trigger("reloadGrid")
neither did work.
thanks for any help!