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

Get aggregates from a group

Updated on Sep 15, 2025

This article shows how to obtain aggregates from a specific group in RadGridView.

In some cases when you define aggregates in RadGridView you need to access the ones in a specific group. You may do this very easily by iterating over the RadGridView groups, checking for a specific group key value and getting the aggregate result(s) as shown in Example 1.

Example 1: Obtaining Group Aggregates

C#
	private void Button1_Click(object sender, RoutedEventArgs e)
	{
	    foreach (QueryableCollectionViewGroup item in this.radGridView.Items.Groups)
	    {
	        if (item.Key.Equals("24"))
	        {
	            MessageBox.Show(item.AggregateResults[0].FormattedValue.ToString());
	        }
	    }
	}

The QueryableCollectionViewGroup class represents a wrapper over an AggregateFunctionsGroup that allows for adding and removing of child items/groups. The snippet above simply checks for a key value equal to 24 and gets the formatted value of the first aggregate result.

See Also

In this article
See Also
Not finding the help you need?
Contact Support