Grand Total Rows
Summary
- AdapTable Layouts can include a Grand Total Row which displays aggregated information
Layouts can include a Grand Total Row which will display the totals for all Aggregated Cells.
Note
- Grand Total Rows use whichever
aggFuncis being applied in the Column being aggregated - Unlike "normal" aggregations, Grand Total Rows display even if Row Grouping is not applied
This is done via the GrandTotalRow property which can be set to one of 6 values:
Hint
The GrandTotalRow property is in the LayoutBase object, and therefore available in both Table and Pivot Layouts
top- row is displayed at top of gridbottom- row is displayed at bottom of gridpinnedTop- row is pinned to the top of gridpinnedBottom- row is pinned to the bottom of gridtrue- equivalent topinnedTopfalse- row is not displayed (same asnull)
Hint
Row Summaries are a more powerful and configurable alternative (but available only in Table Layouts)
Aggregations: Grand Total Row
- This demo provides 3 Layouts all of which have 3 Aggregated Columns -
Github Stars(sum),Github Watchers(sum) andIssue Change(min) - and a Grand Total RowGrouped Layout- the Grid is Row Grouped and the Grand Total Row is at the topPivot Layout- the Grid is Pivoted and the Grand Total Row is at the bottomStandard Layout- the Grid has now Row Groups and the Grand Total Row is pinned to the top
Formatting
By default, Grand Total Rows will be included in all Column Formatting and Styling.
This behaviour can be changed by configuring the RowScope property when defining the Format Column.
The RowScope object enables 4 types of rows to be excluded from the Format Column:
- Data Rows
- Grouped Rows
- Summary Rows
- Grand Total Rows - the focus of this page
Hint
Use the ExcludeDataRows option to create a Format Column that is only rendered in a Grand Total Row
Aggregations: Grand Total Row Formatting
- This demo contains a Grand Total Row with 3 Aggregated Columns, and 3 Format Columns each with a different
RowScope:Github Watchersincludes Grand Total Row but excludes Data RowsGithub Starsexcludes Grand Total Row but includes Data RowsIssue Changeincludes both Grand Total Row and Data Rows