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

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

This sample demonstrates aggregate functionality of the Tree Grid. In this sample, the aggregate value for the columns "Units" and "Unit Price" is displayed in column footer and provide an option to show child summary.

DEMO
SOURCE
Show Child Summary

The Tree Grid supports aggregates which will be displayed at the footer and every hierarchy level. The aggregate configurations can be provided by the aggregates property.

The built-in aggregates are,

  • 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 three different aggregates in the Tree Grid footer.

  • Showing minimum aggregate for "Units" column and the footerTemplate using its type name as (${Min}).
  • Showing maximum aggregate for "Unit Price" column and the footerTemplate using its type name as (${Max}).

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

Additionally, the Tree Grid supports client-side exporting to Excel, PDF, and CSV formats. In this demo, for the toolbar items of exporting, actions are defined in the toolbarClick event to export the Tree Grid data using the excelExport, pdfExport, and csvExport methods.

More information about aggregate can be found in 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