Support Article
Row does not display in previous position on refresh
SA-86072
Summary
Row does not display in its previous position when the 'Allow refresh on update' checkbox is selected.
Error Messages
Not Applicable
Steps to Reproduce
- Configure 'Allow refresh on update' on an editable grid.
- Source the grid with more than 50 rows.
- At runtime, drag the scrollbar down.
- Edit any row (check the position with respect to the scrollbar). After a refresh, the scrollbar moves up. The initial position of the row his changed while editing it (the row).
Root Cause
This behavior is as per Pega product design.
Resolution
Here's the explanation for the reported behavior:
Grid refresh occurs in order to update any added or deleted items in the grid. As a result, the height and width is recalculated and the grid automatically updates its size based on the content.
Since, this is an internal refresh on the grid, the focus of the element is retained by using the browser's Focus method and the browser displays the focusable element. The Focus method attempts to display the element in the available viewport.
In the second case, when the rows move to the bottom, the focused element is available in the first visible viewport. Hence, the scroll need not occur.
There are functional limitations when maintaining the initial scrollbar position. This affects the row updates and the grid itself loses its resizing capability.
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.