We are using OutSystems data grid in our project. The data grid as we know allows user to perform filtering, sorting, grouping, navigate to specific data pages through pagination control etc. We have a requirement to support below scenario
1. The data grid has five data pages in pagination control.
2. User login and visit the screen containing above data grid.
3. User selects the third data page in pagination control.
4. User now goes to some other screen.
5. User comes back to the screen containing data grid. Here we want to automatically select and display the third data page i.e. the page that user had selected when he last visited the screen.
Apparently out of the box this feature is not available, however, if someone was able to achieve it please share how.
Hi @Junaid Syed
Your requirements are business logic related, not features from a UI Component like the Data Grid that should work as a black box and don't contain business-specific features like storing last visited pages or any other kind of data store.
Instead, the developer is responsible for storing and managing all information needed and, trying to use client actions like GetCurrentPage/SetCurrentPage or GetViewLayout/SetViewLayout (example here for this scenario) to store and restore the information saved by the user logged in, according to your implementation strategy.
Cheers,GM
Hi Junaid, This is achievable.
1. Either you can save the selected page index of pagination in database table against that user or you can use it in client variables based on your requirement.
2. You can use below grid API action onInitialize event of the GRID. Pls check the screenshots below FYR.