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

This sample demonstrates custom aggregate functionality of the Tree Grid. In this sample, the custom aggregate value for the columns "Category" is displayed in column footer with dropdown to display the count of selected category name.

DEMO
SOURCE

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 shows the custom aggregate value for the columns “Category” in column footer to display the count of category name.

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

More information about aggregate can be found in this documentation sectionopens in a new tab.

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