Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
Records count and page index not updating
posted

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#383316

Thank you for your time!

Stanislav R

Parents Reply Children
No Data