Skip to main content



      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 05:17 Go to next message
Eclipse UserFriend
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 05:36 Go to previous message
Eclipse UserFriend
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: Sat May 17 03:10:24 EDT 2025

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

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

Back to the top