I've got a filter toolbar in my grid where I set some default values and after the filters are set I run the following code to refresh the content of the grid.
var gridDOM = this; // save $("#list")[0] in a variable
if ($(this).jqGrid('getGridParam', 'datatype') === 'json') {
// the first load from the server
setTimeout(function () {
gridDOM.triggerToolbar();
});
}
The problem with this is that the grid is loaded with all the data first, without any filters applied. This is producing a small "flash" when the filters are applied with the above code.
What I want is to load the result of the filtering directly, and not with preloading the full content, and then present the filtered result.