3.0.5

Row selection on refresh

Now I understand why this is happening, just wondering how I should approach handling how I need this to work.

In my grid, which I have refreshing via AJAX about every 3 seconds. When I select say row 3, when the list refreshes, row 3 stays selected as expected. But here is the catch. When the grid refreshes, the data is not always in the same order. What method should I need to override to handle the selection mantaining the same row no matter where it may be in the grid? I am storing a key value unique to that row and could do an iterative search if need by, just wondering what side-effects (performance, problems) I may run into.

Thanks in advance
Tony (www.FriendsOfAW.com)
February 9,
What I have done in the past, is to send back to the server the selected row when it is clicked. Then when the server sends new data, there is a column that contains a value as to if the column is or is not selected. A simple 1 or 0 will do. Hide that column in the grid. Then when you update the data, run a quick function that 'resets' the selected rows. Or, have the server send back an array of selected rows and use setSelectedRows(). That should give you a start...
Jim Hunter (www.FriendsOfAW.com)
February 9,

This topic is archived.

See also:


Back to support forum