Anil
Anil

Reputation: 37

How can I set Alternate row color in RadGridview in silverlight

How can I set Alternate row color in RadGridview in silverlight

Upvotes: 1

Views: 3136

Answers (1)

Maverik
Maverik

Reputation: 5671

The property you're after is UseAlternateRowStyle & AlternateRowStyle I believe. I've never used telerik's controls myself but I found an example on telerik's forums that will probably help:

Resource Section:

<Style x:Key="GridViewAlternateRowStyle" TargetType="Telerik_Windows_Controls_GridView:GridViewRow">
    <Setter Property="Background" Value="Red"/>
</Style>

Controls Section:

<telerikGridView:RadGridView ItemsSource="{Binding Collection}" AlternateRowStyle="{StaticResource GridViewAlternateRowStyle}" AlternationCount="2"/>

Link to original telerik forum post Here with complete project.

Upvotes: 2

Related Questions