Hello,
We are saving the grid's settings in the local storage so when the user returns to the given screen the grid loads with the last sorting, filtering, page size and on the last page the user has been.
We have some issues when changing the page index - the grid sends the correct parameters but the UI doesn't update and shows the old page index and records count. The grid is not instantiated again but instead we create a new jsonPDataSource in the following manner:var jsonPDataSourceOptions = { urlType: 'remoteUrl', dataSource: ajaxUrl, paging: { enabled: true, pageSize: gridSettings.get(self.options.jobsGridSelector).pageSize, pageIndex: 0 }, responseDataKey: 'd.results.data', urlParamsEncoding: function (owner, params) { self._loadGridSettings(owner, self.options.jobsGridSelector); return true; } };We change the page index in the _loadGridSettings method (We raise a flag in the 'iggridpagingpageindexchanging' which we check in order not to update the page index when the user is changing it):
owner.settings.paging.pageIndex = settings.pageIndex;
Please advice us how to avoid this issue or force the grid to update the UI, like we do with the filters header: http://es.infragistics.com/community/forums/p/75870/383316.aspx#383316Thank you for your time!
Stanislav R
Hi Stanislav,
you can have a look at the following post, and use a similar approach to set the currentPageIndex. If you update the index in the url params only, the UI will not be updated, because it doesn't know that the index is actually different than the default one (which is 0).
http://es.infragistics.com/community/forums/p/76281/385321.aspx#385321
Hope it helps. Let me know if you still experience this issue and i will think about alternatives. Thanks,
Angel
Hello, Thank you for your response.We are building a single page application and the grid is in a separate tab. During an average session the tab can be opened and closed multiple times. Each time we instantiate a new grid and in the grid's options we set the values read from the local storage. So it is not suitable to just set 0 there.
On the same tab with the grid there is a dropdown which filters the products in the grid by category. We set a new data source without instantiating the grid each time the dropdown selection is changed and then the issue occurs - we set the page index but the UI is not updated.
We would greatly appreciate it if you could suggest some workaround that doesn't include calling the following paging method which causes the grid to make another request - $(self.options.jobsGridSelector).igGridPaging("pageIndex", 0);
This is our current solution, but we really would like to avoid this extra request.Thank you for your time!
Any progress?Thank you for your time!