eclipse-nattable / nattable

High performance SWT data grid
https://eclipse.dev/nattable/
Eclipse Public License 2.0
15 stars 6 forks source link

[GroupBy] Add option to add multiple indexes for grouping at once #74

Closed fipro78 closed 4 months ago

fipro78 commented 6 months ago

Currently the API directly only provides an option to add or remove a single index for grouping. If grouping is created programmatically, it might be also useful to create or remove multiple indexes for grouping at once.

Currently this is only possible by accessing the internal groupByColumnIndexes collection.

groupByHeaderLayer.getGroupByModel().getGroupByColumnIndexes().add(1);
groupByHeaderLayer.getGroupByModel().getGroupByColumnIndexes().add(0);
groupByHeaderLayer.getGroupByModel().update();

For convenience it would be nice to provide a addAllGroupByColumnIndexes() and a removeAllGroupByColumnIndexes() method in the GroupByModel.

fipro78 commented 4 months ago

Verified by user