# Using Grouping Expressions

## Overview

The **GroupDescriptorCollection** contains **Expression** property which is used to create flexible grouping conditions. Expression is a string that contains the column name followed by "ASC" (ascending) or "DESC" (descending). Columns are sorted ascending by default. Multiple columns can be separated by commas. Multiple grouping descriptors can be separated by semi column symbol.

## Creating expressions examples

#### Creating simple grouping expression

```C#
this.radGridView1.GroupDescriptors.Expression = "Country ASC";
```

```VB.NET
Me.RadGridView1.GroupDescriptors.Expression = "Country ASC"
```

#### Grouping by two columns, by using an expression

```C#
this.radGridView1.GroupDescriptors.Expression = "Country, ContactTitle DESC";
```

```VB.NET
Me.RadGridView1.GroupDescriptors.Expression = "Country, ContactTitle DESC"
```

#### Creating group on two levels, by using an expression

```C#
this.radGridView1.GroupDescriptors.Expression = "Country ASC; ContactTitle DESC";
```

```VB.NET
Me.RadGridView1.GroupDescriptors.Expression = "Country ASC; ContactTitle DESC"
```

#### Complex grouping

```C#
this.radGridView1.GroupDescriptors.Expression = "Country, ContactTitle ASC; City DESC";
```

```VB.NET
Me.RadGridView1.GroupDescriptors.Expression = "Country, ContactTitle ASC; City DESC"
```

## See Also

* [Basic Grouping](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/basic-grouping)

* [Custom Grouping](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/custom-grouping)

* [Events](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/events)

* [Formatting Group Header Row](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/formatting-group-header-row)

* [Group Aggregates](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/group-aggregates)

* [Groups Collection](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/groups-collection)

* [Setting Groups Programmatically](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/setting-groups-programmatically)

* [Sorting group rows](https://www.telerik.com/products/winforms/documentation/controls/gridview/features/grouping/sorting-group-rows)
