• Material 3
  • Fluent
  • Fluent 2
  • Bootstrap 5
  • Tailwind CSS
  • High Contrast
  • Fluent 2 High Contrast
Preferences
Mode Selection
Touch
Mouse
Theme Selection
Theme Mode
Localization
*Translated by Google Translator.
Currency

Example of Default Aggregate in ASP.NET Core Data Grid Control

This sample demonstrates the aggregate functionality of the Grid. In this sample, the aggregate values for the columns are displayed in the column footer.

DEMO
SOURCE

The Grid supports displaying aggregates in its footer, group footer and group caption. The aggregate configurations can be provided by the aggregates property.

Built-in aggregates:

  • Sum
  • Average
  • Min
  • Max
  • Count
  • TrueCount
  • FalseCount
  • Custom - Requires the customAggregate property to perform aggregation. The custom aggregate value can be accessed inside template using the key ${custom}.

In this demo, the footerTemplate property is used to display four different aggregates (${Sum}, ${Average}, ${Max} and ${Min}) in the Grid footer. Each aggregate type is specified using the type and field properties accessed in the footerTemplate with its type name. The aggregate value will be formatted based on its format value (N2 or C2) before being displayed.

The template expression should be provided inside ${...} the interpolation syntax.

In this demo, the footerTemplate property is used to display four different aggregates (Sum, Average, Max, Min) for the EnergyProduced field in the Grid footer. Each aggregate type is specified using the type and field properties accessed in the footer template by its type name. The aggregate value will be formatted based on its format value (N2) before being displayed.

Transform your ASP.NET Core web apps today with Syncfusion ASP.NET Core components
85+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab