I would like to add Datepicker filter "outside" igGrid. How do I bind source and raise event to trigger igGrid refresh?
Hi Sebrina,
What do you mean by not able to see the page index and size after refresh. Do you refresh the page or you apply new data source?
Page size and index are retained when the data is bound to the grid. This is due to the persistence of the Paging feature and you can turn it off.
Can you provide a sample which demonstrates this behavior?
Hi Dyan,
Thank you for the help. It works! :)
But then I come to encounter another problem, is to continue applying igGridPaging after refresh the Grid with DatePicker filter.
Here is what I have, with this, I am getting the filtered data inside grid, but I am unable to see the whole list as the paging index and size is gone after refresh, I am now only be able to view the first page
jQuery.ajax({ url: "report.php?xxxx", data: { start_time : start_time , end_time: end_time}, dataType: "json", method: "post", success: function(response) { if (response) {
jQuery("#grid").igGrid("option", "dataSource", response);
}, error: function(xhr, ajaxOptions, thrownError) { console.log("Search Error!!"); } });
One approach to do this is to get the value from the DatePicker and use the filtering API - filter
Or alternatively you can filter your data manually and set it as a new datasource to the grid.(dataSource)