You cannot use the loadstate
method in conjunction with server-side filtering due to the fact that when the loadstate applies it’s filters, it get’s disrupted because the filter callback is called in the middle of the loadstate, triggering the updatebounddata
method, something like this:
var source =
{
datatype: "jsonp",
datafields: [
{ name: 'countryName', type: 'string' },
{ name: 'name', type: 'string' },
{ name: 'population', type: 'float' },
{ name: 'continentCode', type: 'string' }
],
url: "http://api.geonames.org/searchJSON",
filter: function () {
// update the grid and send a request to the server.
$("#jqxgrid").jqxGrid('updatebounddata');
}
};
You can see how the loadstate would trigger the above filter callback, causing the updatebounddata
method to be called in the middle of the loadstate
routine, what happens is that you get an error and the filterrow becomes invisible….any advice on how to work around this?
I have setup a jsfiddle using your examples to demonstrate this behavior:
http://jsfiddle.net/nyPsV/9/