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

Setting Groups Programmatically

Updated on Jul 16, 2026

Overview

RadGridView has a GroupDescriptors property at the GridViewTemplate level which is exposed in RadGridView class for MasterTemplate instance. This collection allows you to use descriptors which define the grouping criteria and the group's sorting direction for the data that is bound to the RadGridView.

As this is a collection, you are able not only to add, but to remove or clear its entries as well. Adding descriptors to the collection makes the current view display the items sorted and divided into groups.

Using GroupDescriptors

Using simple group descriptor

C#
GroupDescriptor descriptor = new GroupDescriptor();
descriptor.GroupNames.Add("Country", ListSortDirection.Ascending);
this.radGridView1.GroupDescriptors.Add(descriptor);

Grid grouped by a simple group descriptor

Telerik UI for WinForms RadGridView showing data grouped by a single GroupDescriptor

The GroupNames property defines the property, by which the data will be grouped. The GroupNames is a SortDescriptorCollection and defines group names for one grouping criteria.

RadGridView supports grouping using one or more property names. The following example demonstrates how you can group by two properties:

Grouping by more than one column name

C#
GroupDescriptor descriptor1 = new GroupDescriptor();
descriptor1.GroupNames.Add("Country", ListSortDirection.Ascending);
descriptor1.GroupNames.Add("ContactTitle", ListSortDirection.Descending);
this.radGridView1.GroupDescriptors.Add(descriptor1);

Grid grouped by more than one column name

Telerik UI for WinForms RadGridView showing grouping by multiple column names within the same group descriptor

RadGridView supports grouping on one or more levels. The following example demonstrates how you can group on two levels:

Grouping on one or more levels

C#
GroupDescriptor descriptor2 = new GroupDescriptor();
descriptor2.GroupNames.Add("Country", ListSortDirection.Ascending);
GroupDescriptor descriptor3 = new GroupDescriptor();
descriptor3.GroupNames.Add("ContactTitle", ListSortDirection.Ascending);
this.radGridView1.GroupDescriptors.Add(descriptor2);
this.radGridView1.GroupDescriptors.Add(descriptor3);

Grid grouped across multiple hierarchy levels

Telerik UI for WinForms RadGridView showing grouping applied across multiple hierarchy levels

See Also