Skip to main content



      Home
Home » Eclipse Projects » NatTable » Preserve Selection On Sorting(Selection changes after we sort the table)
Preserve Selection On Sorting [message #1699439] Wed, 24 June 2015 06:52 Go to next message
Eclipse UserFriend
Suppose row 1 is selected and I sort the table and row 1 moves to position 5. But in table row 1 remains selected. Ideally old row 1 (new row 5) which is at position 5 should be selected.

What I do is save the selected objects before sorting and after sorting is done I select the same objects. Is that the correct approach?? Secondly, I want that in this case selection event shouldn't be fired because there is no change in selection.. is there any way of doing this?
Re: Preserve Selection On Sorting [message #1699443 is a reply to message #1699439] Wed, 24 June 2015 07:19 Go to previous message
Eclipse UserFriend
That depends on your selection model. If you have row selection only, the RowSelectionModel should do that job already. If you don't have row selection you can use the PreserveSelectionModel to do that job for you. But you need to provide some information about identifying a row object uniquely to make it work via IRowIdAccessor.

There should be already some forum posts regarding that requirement.
Previous Topic:Filter Row - Initial values
Next Topic:Simple DataLayer filtering
Goto Forum:
  


Current Time: Tue Jul 08 02:01:01 EDT 2025

Powered by FUDForum. Page generated in 0.62223 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top