Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Problems with ColumnGroupHeaderLayer in a Grid
Problems with ColumnGroupHeaderLayer in a Grid [message #1072731] Tue, 23 July 2013 11:46 Go to next message
Joachim Fuchs is currently offline Joachim FuchsFriend
Messages: 34
Registered: February 2013
Member
Hi,

how to put a ColumnGroupHeaderLayer into a grid?

CompositeLayer gridLayer = new CompositeLayer(1, 3);
gridLayer.setChildLayer(GridRegion.COLUMN_GROUP_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnHeaderLayer, 0, 1);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 2);

or
CompositeLayer gridLayer = new CompositeLayer(1, 2);
gridLayer.setChildLayer(GridRegion.COLUMN_GROUP_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 1);

???????

Both ways it looks broken somehow. The example comes with a full grid layer but I do not want the row header.

Any help is appreciated.

J

Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1072744 is a reply to message #1072731] Tue, 23 July 2013 12:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1405
Registered: July 2012
Senior Member
What about

CompositeLayer gridLayer = new CompositeLayer(1, 2);
gridLayer.setChildLayer(GridRegion.COLUMN_HEADER, columnGroupHeaderLayer, 0, 0);
gridLayer.setChildLayer(GridRegion.BODY, bodyLayer, 0, 1);


Not sure, haven't tried that before.
Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1073371 is a reply to message #1072744] Wed, 24 July 2013 16:01 Go to previous messageGo to next message
Joachim Fuchs is currently offline Joachim FuchsFriend
Messages: 34
Registered: February 2013
Member
That one worked.

BTW: What is the preferrable way to work with column groups, via the ColumnGroupModel or the ColumnGroupHeaderLayer? I noticed that there are some issues/uncertainties with collapsing, setting groups collapseable and resizing collapsed columns.

Do you have any hints on column grouping?

J
Re: Problems with ColumnGroupHeaderLayer in a Grid [message #1073608 is a reply to message #1073371] Thu, 25 July 2013 07:01 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 1405
Registered: July 2012
Senior Member
Well the column grouping is something that needs to be reworked completely. There are a lot of inconsistencies regarding API and usage.

It should be working on the ColumnGroupHeaderLayer and hide the ColumnGroupModel from the rest of the world. And then we should use commands for all the actions regarding grouping. I'm not sure, but AFAIK this is not consistent for all actions.
Previous Topic:Problem with my Custom Editors with Nattable 1.0.1
Next Topic:NatTable Testing
Goto Forum:
  


Current Time: Sun Nov 23 03:57:29 GMT 2014

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

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