DataGrid / Aggregates / Group and Caption Aggregate

Blazor DataGrid Example - Group and Caption Aggregates

Loading Syncfusion Blazor Server Demos…

Drag a column header here to group its column
0 of 0 pages (0 items)

This sample demonstrates the DataGrid's aggregate functionality with group footer and group caption display options.

The Blazor DataGrid supports aggregates displayed in the footer, group footer, and group caption sections. Configure aggregates using the GridAggregates component.

The built-in aggregate types are:

  • Sum - Calculates total sum
  • Average - Calculates average value
  • Min - Identifies minimum value
  • Max - Identifies maximum value
  • Count - Counts total records
  • TrueCount - Counts boolean true values
  • FalseCount - Counts boolean false values

In this demo:

  • The GroupFooterTemplate displays group footer aggregates for Units in Stock and Discontinued columns using Sum aggregate type
  • The GroupCaptionTemplate displays group caption aggregates for Units in Stock column using Max aggregate type

Configure aggregates by setting the Type and Field properties. Access aggregate values in templates using the Type name (e.g., SumValue.Sum) where the prefix is the implicit Context parameter.

For more detailed information about group and caption aggregates, refer to the group and caption aggregate documentation.

Transform your Blazor web apps today with Syncfusion® Blazor components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE