Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Strange column reorder behavior
Strange column reorder behavior [message #1774028] Mon, 09 October 2017 12:19 Go to next message
Tobias W. is currently offline Tobias W.Friend
Messages: 10
Registered: May 2017
Junior Member
I've noticed a strange behavior in the NatTable when using fixed columns.
If I have a fixed column in a grid with multiple columns this fixed column can't be dragged to another position (nothing happens as expected). But when I change the position of another (non-fixed) column and the try to drag the fixed column to another position columns get changed, also the fixed column stays at its original position.

Example:

table with 4 columns, first is fixed, following are non-fixed

| 0 fixed | 1 non-fixed | 2 non-fixed | 3 non-fixed |

dragging fixed column 0 to position 2 doesn't has any affect

| 0 fixed | 1 non-fixed | 2 non-fixed | 3 non-fixed |

dragging column 3 to position 1

| 0 fixed | 3 non-fixed | 1 non-fixed | 2 non-fixed |

dragging fixed column to position 2 changes column positions

| 0 fixed | 1 non-fixed | 3 non-fixed | 2 non-fixed |


Has anyone an idea what causes this "unlocking" of the column positions when a non-fixed column has been dragged?

Re: Strange column reorder behavior [message #1774029 is a reply to message #1774028] Mon, 09 October 2017 12:38 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Sorry for my question, but it seems sometimes I am not aware about the features we provide in NatTable. How do you configure that a column is fixed and can not be reordered? Somehow I am not aware of that feature and find nothing in our codebase that would support this.
Re: Strange column reorder behavior [message #1774032 is a reply to message #1774029] Mon, 09 October 2017 13:53 Go to previous messageGo to next message
Tobias W. is currently offline Tobias W.Friend
Messages: 10
Registered: May 2017
Junior Member
Hi Dirk,

fixed was the wrong word, sorry, I meant frozen columns (columns which stay always visible when the table is scrolled horizontally).

Those columns can't be reordered as far as I know.
Re: Strange column reorder behavior [message #1774043 is a reply to message #1774032] Mon, 09 October 2017 15:28 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Why do you think frozen colums should not be able to be reordered. Of course it is discusable, but IIRC if you drag a column from the frozen region to the unfrozen region, it is removed out of the freeze region. At least this is the default behavior when looking into the codebase.

IIRC I implemented a ColumnReorderDragMode for a customer that checks for the freeze region and avoids this. But that is not the default, as then the command handler needs to know the FreezeLayer to check for the freeze region, which would introduce a dependency that is not available when looking into the ColumnReorderLayer by its own.
Previous Topic:Sorting not proper for numeric values
Next Topic:Is it possible to use the SpanningDataLayer and an ISpanningDataProvider with a GridLayer?
Goto Forum:
  


Current Time: Thu Apr 25 15:15:34 GMT 2024

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

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

Back to the top