Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How to re-configure the column group header(without a recreation of the layer stack)
How to re-configure the column group header [message #1802934] Tue, 19 February 2019 10:17 Go to next message
Hilger Steenblock is currently offline Hilger SteenblockFriend
Messages: 16
Registered: June 2016
Junior Member
I want to re-configure the structure of the column header without rebuilding a new layer stack. Doing this I try to reconfigure the ColumnGroupHeaderLayer with following commands:

columnGroupHeaderLayer.clearConfiguration();
columnGroupHeaderLayer.clearAllGroups();
columnGroupHeaderLayer.addColumnsIndexesToGroup("Group 1", 1);

Is this approach an intended solution or is there maybe another recommended way to archive this?

Example to reproduce DynamicColumnHeaderHeightExample, with following changed lines in the button listener:
 button.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                filterRowHeaderLayer.setFilterRowVisible(!filterRowHeaderLayer.isFilterRowVisible());

                columnGroupHeaderLayer.clearConfiguration();
                columnGroupHeaderLayer.clearAllGroups();
                if (DynamicColumnHeaderHeightExample.this.toggleGroup) {
                    columnGroupHeaderLayer.addColumnsIndexesToGroup("Group 1", 1);
                } else {
                    columnGroupHeaderLayer.addColumnsIndexesToGroup("Group 1", 1, 2);
                }
                DynamicColumnHeaderHeightExample.this.toggleGroup = !DynamicColumnHeaderHeightExample.this.toggleGroup;
            }
        });
Re: How to re-configure the column group header [message #1802936 is a reply to message #1802934] Tue, 19 February 2019 10:36 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2682
Registered: July 2012
Senior Member
If you only want to change the column group structure, I don't think you need to call columnGroupHeaderLayer.clearConfiguration();

Actually I think this will create issues on the way because the necessary click and rendering configurations are removed. You should only need to clearAllGroups() and then configure the new column groups for this scenario.
Previous Topic:Sorting removes applied filters
Next Topic:Filter restarting the row numbers from "1"
Goto Forum:
  


Current Time: Wed May 22 09:41:52 GMT 2019

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

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

Back to the top