Skip to main content



      Home
Home » Eclipse Projects » NatTable » Disable row DnD while sorted
Disable row DnD while sorted [message #1714859] Tue, 17 November 2015 05:45 Go to next message
Eclipse UserFriend
Hello,

is it possible to check whether the table is currently in a sorted state? What I would like to achieve is: disable row DnD while any column is sorted.
My idea was to unregister the mouse drag mode from the ui binding registry when the table reaches a sortable state and register it again, when the table is not sorted anymore.

Is this even a good idea? Can I use any listener for this?

Regards
Tommy
Re: Disable row DnD while sorted [message #1714879 is a reply to message #1714859] Tue, 17 November 2015 07:48 Go to previous messageGo to next message
Eclipse UserFriend
Typically you would implement a MouseEventMatcher that returns false in matches() in case you have some sorted state. And you would use the MouseEventMatcher to register the RowReorderDragMode.

Have a look at DefaultRowReorderBindings and think about how you could create a MouseEventMatcher that knows about the sorted state.
Re: Disable row DnD while sorted [message #1714894 is a reply to message #1714879] Tue, 17 November 2015 09:06 Go to previous message
Eclipse UserFriend
Thanks for the answer. I implemented my own MouseEventMatcher now and gave it the ISortModel to check whether the table is sorted in any way. That works.
Previous Topic:Update column comparators after column reorder
Next Topic:Filtering filter dropdown
Goto Forum:
  


Current Time: Mon Jun 23 09:49:55 EDT 2025

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

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

Back to the top