Reputation: 5161
I am refreshing the grid every second or so. Once a row is selected, I want to keep the same row selected on the next refresh. Is there a way to load the table with a row selected to maintain a stable selection (so that the user will feel that the row is always selected even with data refresh)?
Also, on every refresh, the rowData is a different object reference.
Upvotes: 3
Views: 4015
Reputation: 2942
Since more than a year and half is passed, I hope my answer would be still useful.
You don't need to load the data with preselected row, or store selected rows somewhere and reselect them programatically when data is reloaded. The solution is to not overload the table rows every time you receive a new data.
For that you may use Transaction Updates which only updates cell values and keeps every other data (and metadata).
Upvotes: 0
Reputation: 9
With getRowNodeId function
use
deltaRowDataMode = true
Every row should have a unique id
.
Upvotes: 0
Reputation: 2541
Unfortunately not out of the box. What you need to do is something like this:
Upvotes: 0