I have custom button to filer the jqgrid. Onpage load grid gives me 100 records. If I export to excel I got 100 records correctly. Then I filter the jqgrid and grid shows me 10 records. But if I export to excel I got 100 records which I got previously.
Below is my code for filter.
$("#grid").jqGrid('setGridParam', {
search: true,
postData: {filters: filter},
sortname: 'statusCode',
sortorder: 'asc'
});
$("#grid").setGridParam({page:1}).trigger("reloadGrid");
var gridData = $("#grid").jqGrid('getGridParam','data');
In gridData I got 100 object each time irrespective of any filter. I need only records to be export which are displayed in grid after filtration.
Please suggest solution how I can get 10 records from grid.