Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:52 Go to next message
Raptor X is currently offline Raptor XFriend
Messages: 34
Registered: November 2012
Member
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 11:19 Go to previous message
Dirk Fauth is currently online Dirk FauthFriend
Messages: 2803
Registered: July 2012
Senior Member
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: Sat Mar 06 06:05:53 GMT 2021

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

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

Back to the top