New to Telerik UI for WPFStart a free 30-day trial

Apply Aggregate Functions When Using Generic Group Descriptors

Updated on Sep 18, 2025

Environment

Product Version2025.3.815
ProductRadGridView for WPF

Description

Apply aggregate functions when using the generic group descriptors.

Solution

To apply aggregate functions when working with generic group descriptors, you can define your function, and add it to its AggregateFunctions collection.

[C#] Generic group descriptor with aggregate function

var descriptor = new GroupDescriptor<Employee, int, int> 
{ 
    GroupingExpression = e => e.Orders.Where(o => o.Details.Any(d => d.Product.ProductName.Contains("Syrup"))).Count(), 
    SortDirection = ListSortDirection.Ascending 
};

descriptor.AggregateFunctions.Add(new SumFunction(){ Caption = "Sum of syrups: ", SourceField = "Product" });
In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support