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

This sample demonstrates aggregate functionality of the Grid. In this sample, the aggregate value for the columns are displayed in 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.

The built-in aggregates are,

  • Sum
  • Average
  • Min
  • Max
  • Count
  • Truecount
  • Falsecount
  • Custom

In this demo, the FooterTemplate property is used to display four different aggregates (Sum, Average, Max, Min) 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 or C2) before being displayed.

For more details on the row template feature, refer to this documentation section.

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