Row Grouping - Grouped Rows

Summary

  • Grouped Rows are the rows created by each Row Grouped Column value
  • AdapTable extends Formatting (and Badge Styles) to Grouped Rows

Grouped Rows are the Rows created by AG Grid when Row Grouping.

There is one Grouped Row for each value in the Row Grouped Column.

Three Modules support Row Grouping by rendering their content automatically in Grouped Rows:

ModuleOnly Columns with Aggregation
Format Column
Badge Style
Action Columns

Excluding Group Rows

By default, these Modules' content will always be rendered inside Grouped Rows (and also in Pivot Layouts).

If this is not desired behaviour, it can be changed by setting ExcludeGroupRows to true in the object's RowScope property (the default value is false).

Hint

  • The RowScope object also contains an ExcludeDataRows property which will not render the item in "normal" rows
  • This allows you to create a Format Column or Badge Style that is only rendered in a Group Row

Format Columns

Format Columns will be automatically rendered in any Grouped Row cell that contains an Aggregation.

Hint

If this is not desired then set ExcludeGroupRows to true in the Format Column's RowScope property

Grouped Rows: Format Columns
Fork
  • This example demonstrates adding Format Columns to Grouped Rows in AdapTable
  • We row-group on Language Column, set many Columns to have a sum Aggregation
  • We provide 3 sets of Format Columns each with different exclusion rules:
    • Open PRsand Closed PRs have a Fore Color of blue and no exclusions (so is rendered in whole column)
    • Open Issues and Closed Issues have a Fore Color of yellow excludes regular rows (so is only rendered in Grouped Rows)
    • Github Stars and Github Watchers have a Fore Color of red and excludes Grouped Rows (so is only rendered in leaf / data Rows)
Try It Out
  • Remove an Aggregation for a Column and note how nothing will appear in that Column's Grouped Rows

Badge Styles

Badge Styled Columns will be automatically rendered in any Grouped Row cell that contains an Aggregation.

If this is not desired, then the ExcludeGroupRows option in the Styled Column's RowScope property, can be used to exclude Grouped Rows from rending the Badge Style.

Note

Cells which exclude Badge Styles will still display Format Columns (if they have been provided)

Grouped Rows: Badge Styles
Fork
  • This example demonstrates adding Badge Styles to Grouped Rows in AdapTable; we again row-group on Language Column, set many Columns to have a sum Aggregation
  • We provide 3 Badge Styles each with different exclusion rules:
    • Closed Issues - has no exclusions (so is rendered in whole column)
    • Open PRs and have a Fore Color of yellow excludes regular rows (so is only rendered in Grouped Rows)
    • Closed PRs excludes Grouped Rows (so is only rendered in leaf / data Rows)
  • Note: Because Open PRs and Closed PRs have a Format Column applied, that is rendered in the Cells where there are no Badges

Action Columns

Action Columns are automatically rendered in all Grouped Row cells.

If this is not desired, then the ExcludeGroupRows option in the Action Column's rowScope property, can be used to exclude Grouped Rows from rending the Action Column.

Row Grouping: Action Columns in Grouped Rows
Fork
  • This example demonstrates adding Action Columns to Grouped Rows in AdapTable; we again row-group on Language Column
  • We provide 2 Action Columns each with different exclusion rules:
    • Change Theme - has no exclusions (so is rendered in whole column)
    • Add Star excludes Grouped rows (so is only rendered in leaf / data Rows)