New to Telerik UI for WPF? Download free 30-day trial

Alternating Rows

RadGridView allows you to have alternating rows should you need to improve readability.

In order to define the pattern of alternation, you have to set the AlternationCount property. For example, if you want to alternate each second row, you have to set its value to 2. Setting the AlternationCount property to 3 shows an alternating color for each third row.

Example 1: Setting the AlternationCount Property

<telerik:RadGridView AlternationCount="2" /> 

Telerik WPF DataGrid Rows Alternating Rows 02

In order to style the alternating rows, you can specify the AlternateRowStyle and/or the AlternateRowBackground properties. If you do not specify an AlternateRowBackground a default color will be picked, based on the current theme.

To learn more about styling the rows and the alternating rows you can read the following article.

Example 2 shows RadGridView with AlternationCount set to 2 and AlternateRowBackground color set to Coral.

Example 2: Setting the AlternateRowBackground Property

<telerik:RadGridView AlternationCount="2" 
                   AlternateRowBackground="Coral" /> 

Telerik WPF DataGrid Rows Alternating Rows 01

See Also

In this article