Hello. I have a problem with Grid. It’s about lazyDataProvider and maintaining selection data. For each row, I also have an index from the backend, which I want to use with the ScrollToIndex method. The problem is that after sorting, when the selection is preserved, the index does not change.
Index is always populated from backend from 0 to n, after every sort.
To be more specific:
I select the first record in the Grid, which has index 0
I sort in reverse
This record still has index 0, but if I deselect and reselect it, the index updates correctly
It may be the same bug as described here. Scrolling to index does not happen before Grid rendering is complete. And doing refreshAll will retrigger Grid render.
The problem is that DataRow contains index, calculated from backend. After refreshing all, records in grid are resorted. My previously selected item is in different position in grid. But re selecting item and getting selection, returns old index, instead of new one.