# Grouping Modes

As of **Q3 2012** we have introduced a new property of the RadGridView control - **GroupRenderMode**. It has two possible values:

**Nested**: This is the default value and it will nest **GridViewGroupRows** into one another. With this group render mode every group is represented by its own UI container and groups are nested in a hierarchical manner. The visual element representing the grouped row is **GridViewGroupRow**.

**Flat**: This mode represents our new virtualization mechanism with a completely new item container generator. It simply renders rows one below the other and all rows are on the same level. The visual element representing the grouped row is **GroupHeaderRow**.

> important For compatibility reasons, the Nested render mode is also preserved, but it is highly recommended to use the new Flat mode as it leads to better performance and most of the latest features and bug fixes only target this mode.

> Please note that when you use the **Flat mode**, you should work with **GroupHeaderRow**, not **GridViewGroupRow**.

## Setting the Group Render Mode

Set the `GroupRenderMode` property to `Flat` to use the flat layout.

The following XAML fragment assumes that the `telerik` prefix maps to the `http://schemas.telerik.com/2008/xaml/presentation` namespace.

**Example 1: Setting the GroupRenderMode to Flat**

```XAML
<telerik:RadGridView GroupRenderMode="Flat" />
```

## FlatLayoutStrategy and NestedLayoutStrategy

`GridViewDataControl` internally uses `FlatLayoutStrategy` and `NestedLayoutStrategy`. The control creates the strategy that matches the current `GroupRenderMode` value, so you cannot instantiate or replace these classes. To use the flat layout strategy, set the `GroupRenderMode` property to `Flat`.

## See Also

* [Basic Grouping](https://www.telerik.com/products/wpf/documentation/controls/radgridview/grouping/basics)
* [Programmatic Grouping](https://www.telerik.com/products/wpf/documentation/controls/radgridview/grouping/programmatic-grouping)
