Hi. What we want to achieve in our current project is to save the user's settings like "sorting", "pageSize", "pageIndex" and "filtering" for the grid and when he/she loads it again, the grid will be loaded like the last time the user left it. We managed to set "sorting" with "columnSettings" option, also the "pageSize" and "pageIndex" in the options which we use for initializing the grid.
The problem is with the "Filtering". We couldn't find in the documentation any option which could allow you to set initial filtering and along this to update the UI respectively. What we want is to set all the settings in the options and load the grid with only one remote request, instead of loading it clean and then applying igGridFiltering, igGridPaging or igGridSorting methods, because in this way we have like 4 or more additional requests (all the features are set to remote type).
So is there a way to set the filtering in the features[] option the same way we did with the other settings?
Best Regards,Georgi Tsvetkov
Hi Georgi,
igGridFiltering doesn't have this functionality out of the box. However this functionality exists in $.ig.DataSource. As a workaround you can create an instance of $.ig.DataSource and set its parameters($.ig.DataSource.settings.paging, $.ig.DataSource.settings.sorting, $.ig.DataSource.settings.filtering) in the urlParamsEncoding callback . Then just pass the configured $.ig.DataSource instance to igGrid.dataSource option.
Here is an example code:
Hope this helps,Martin Pavlov
Infragistics, Inc.
Thank you very much for the fast answer. The filtering is now working along with other settings, but still the input field for the filtered column in filter row is empty and thus there isn't an indication for the user that the grid has been filtered. Should we think of some custom solution or you can suggest us a quick workaround?
P.S. Понеже ми се струва че доста от хората, които отговарят са българи, ако пиша на български в този форум дали ще получа отговор?