# Alternation

**RadVirtualGrid** allows alternating its rows and columns when readability needs to be improved. This article covers the mechanism in details.

## Row Alternation

The row alternation of the control can be utilized through the **RowAlternationCount** property.

**Example 1: Setting the RowAlternationCount**

```XAML
<telerik:RadVirtualGrid x:Name="VirtualGrid" 
                        InitialColumnCount="4" 
                        InitialRowCount="4"
                        RowAlternationCount="2"/>
```

> caption Setting the RowAlternationCount property

![Setting the RowAlternationCount property](https://www.telerik.com/products/wpf/documentation/assets/e3bb7793d10ecda86dbac5a6a2f5733b/radvirtualgrid_features_alternation_01.png)

## Column Alternation

Respectively, the alternation of the columns of **RadVirtualGrid** can be manipulated through the **ColumnAlternationCount** property of the control.

**Example 2: Setting the ColumnAlternationCount**

```XAML
<telerik:RadVirtualGrid x:Name="VirtualGrid2" 
                        InitialColumnCount="4" 
                        InitialRowCount="4"
                        ColumnAlternationCount="2"/>
```

> caption Setting the ColumnAlternationCount property

![Setting the ColumnAlternationCount property](https://www.telerik.com/products/wpf/documentation/assets/879fcacaa334769aecf477b754d73353/radvirtualgrid_features_alternation_02.png)

## Custom Alternation color

**RadVirtualGrid** exposes a property for altering the default background applied to the elements participating in the alternation: **AlternationBrush**.

**Example 3: Setting the AlternationBrush**

```XAML
<telerik:RadVirtualGrid x:Name="VirtualGrid3" 
                        InitialColumnCount="4" 
                        InitialRowCount="4"
								RowAlternationCount="2"
                        ColumnAlternationCount="2"
								AlternationBrush="Beige"/>
```

> caption Setting the AlternationBrush property

![Setting the ColumnAlternationCount property](https://www.telerik.com/products/wpf/documentation/assets/f286ec145fa7187b5f3d336937e03fe1/radvirtualgrid_features_alternation_03.png)

## See Also

* [Column and Row Resizing](https://www.telerik.com/products/wpf/documentation/controls/radvirtualgrid/features/column-and-row-resizing)

* [Editing](https://www.telerik.com/products/wpf/documentation/controls/radvirtualgrid/features/editing)

* [Insert and Remove Data](https://www.telerik.com/products/wpf/documentation/controls/radvirtualgrid/features/insert-and-remove-data)
