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:
| Module | Only 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
RowScopeobject also contains anExcludeDataRowsproperty 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
- This example demonstrates adding Format Columns to Grouped Rows in AdapTable
- We row-group on
LanguageColumn, set many Columns to have asumAggregation - We provide 3 sets of Format Columns each with different exclusion rules:
Open PRsandClosed PRshave a Fore Color of blue and no exclusions (so is rendered in whole column)Open IssuesandClosed Issueshave a Fore Color of yellow excludes regular rows (so is only rendered in Grouped Rows)Github StarsandGithub Watchershave a Fore Color of red and excludes Grouped Rows (so is only rendered in leaf / data Rows)
- 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)
- This example demonstrates adding Badge Styles to Grouped Rows in AdapTable; we again row-group on
LanguageColumn, set many Columns to have asumAggregation - We provide 3 Badge Styles each with different exclusion rules:
Closed Issues- has no exclusions (so is rendered in whole column)Open PRsand have a Fore Color of yellow excludes regular rows (so is only rendered in Grouped Rows)Closed PRsexcludes Grouped Rows (so is only rendered in leaf / data Rows)
- Note: Because
Open PRsandClosed PRshave 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.
- This example demonstrates adding Action Columns to Grouped Rows in AdapTable; we again row-group on
LanguageColumn - We provide 2 Action Columns each with different exclusion rules:
Change Theme- has no exclusions (so is rendered in whole column)Add Starexcludes Grouped rows (so is only rendered in leaf / data Rows)