Support Article
Grid View Not picking the correct record while sorting
SA-33012
Summary
The user is using grid view to display the contents of a data page. They are calling a rest service to fetch the data for a particular element in the list (getting line items for a page). It is working correctly without sorting. But when they sort the list on any column, then it is not picking the right data.
Error Messages
Not Applicable
Steps to Reproduce
- Add a grid view with collapsible layout to a section.
- Make data page as a source.
- Select a row and do some operation and display the values used in the data page. It would pick the wrong data.
Root Cause
On analysis the configurations, user had checked “Reload once per interaction” checkbox under the load management tab of data page. Hence, on sorting, the the data page would be reloaded and sets its values to default.
Consider the below example:
The below snapshot shows the order of data stored in data page:
On sorting, and clicking on the “Select” menu for the first row ( for ex ), we observe the below order number displayed. This order number is the first order number present in the data page. Accordingly when we fetch the values of order numbers for second row, the second order number present in the data page is displayed and henceforth. This shows us that on every user interaction the data page gets reloaded.
Resolution
Provided the below local change:
Under load management tab, uncheck the “Reload once per interaction” checkbox.
Note : You could also specify a refresh interval under “Reload if older than” could also be specified for the reload of data page.
Published February 3, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.