Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Unmovable Column (in GroupBy... table)
Unmovable Column (in GroupBy... table) [message #1386388] Tue, 17 June 2014 09:57 Go to next message
Roman Flückiger is currently offline Roman Flückiger
Messages: 6
Registered: March 2013
Junior Member
Hi all,

I'm using the GroupByDataLayer / GroupByHeaderLayer to get a table with grouping capabilities. However, the standard behaviour of the layer seems to use the first column (no matter what) for the resulting tree structure, while I'd prefer to have a dedicated tree structure column being added (with pulls the data from the respective column depending on the tree level).

Now, I'm defining this additional column as the first column in my table. Then I show/hide it depending on the state of the GroupByModel. For this to work this "special" column must always remain the first column in the table, it should not be moveable, it should not be draggable to become a group-by node, etc. (while of course, all the other columns are still moveable, draggable, etc.)

So, I'm going from layer to layer (ColumnReorderLayer, ColumnHideShowLayer, GroupByHeaderLayer, ...) and try to "configure" them accordingly.

E.g. I tried to add a different configuration to the ColumnReorderLayer with an overridden version of ColumnReorderDragMode - which prevents column 0 from being dragged. But I noticed that the same DragMode is already "overridden" by the GroupByHeaderLayer, in a way that does not allow any configuration. I fear to face similar problems with other layers that need tweaking to achieve this "Unmoveable Column". So, before I start to override/hack/rewrite all the layers involved, I thought I'd ask here, if there is any other - maybe obvious, maybe more sensible - way, that I have missed, to achieve this?

Thanks for any kind of advice...

Regards,
Roman
Re: Unmovable Column (in GroupBy... table) [message #1386389 is a reply to message #1386388] Tue, 17 June 2014 10:08 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk Fauth
Messages: 1289
Registered: July 2012
Senior Member
Typically register a command handler for the same action in a layer above. Commands are not "overriden", they are consumed, so the first layer or command handler that processes a command and returns true (which indicates the command was handled) it is not further processed. That means register a command handler that is able to process the command first.
Re: Unmovable Column (in GroupBy... table) [message #1386395 is a reply to message #1386389] Tue, 17 June 2014 10:22 Go to previous message
Roman Flückiger is currently offline Roman Flückiger
Messages: 6
Registered: March 2013
Junior Member
Ok. This was fast. Smile
I'll try that right away and see how far it gets me.

Thanks!
Previous Topic:Zoom NatTable out
Next Topic:Finding row index in TreeLayer
Goto Forum:
  


Current Time: Sat Sep 20 00:06:06 GMT 2014

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

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