1

Is there an option to automatically group table data by specific column without user action to group by column in table header.

When I click on column and set Group, table is grouped by that column and that looks awesome, now I need that option to set in code, without user interaction.

Thanks

sysdba
  • 57
  • 5

2 Answers2

1

Yes, you can return true in AbstractColumn.getConfiguredGrouped() of your column. You need to set getConfiguredSortIndex() too.

If you made manual changes in your table (e.g. changed column width, order, ..), you may need to reset your table to the defaults via the setting icon.

Stephan Merkli
  • 126
  • 1
  • 5
0

When you want to change the sort columns programmatically at runtime you can use the column-set of the table. Something like this:

ITable table = getTable();
ColumnSet colSet = table.getColumnSet();
IColumn<?> sortCol = colSet.getColumnByClass(MyColumn.class);
colSet.addSortColumn(sortCol, true);
Andre
  • 178
  • 4