This is a migrated thread and some comments may be shown as answers.

Alternate Row Color Style

1 Answer 171 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Parul
Top achievements
Rank 1
Parul asked on 19 May 2011, 12:57 PM
Hi All,

I am using Wpf 4.0 and telerik data grid in my applictaion.
I have a requirement tha i have to set alternate row colors as blue and red.
I got the following style but htrough this i can set only on background color.
<Style x:Key="AlternateRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}">
        <Setter Property="Background" Value="Red" />
        <Setter Property="BorderBrush" Value="#D4D6D6" />
</Style>
  
<Style TargetType="{x:Type framework:RTPOGridView}">
        <Setter Property="AlternateRowStyle" Value="{DynamicResource AlternateRowStyle}"/>
<Setter Property="Background" Value="Blue" />
</Style>

But i am not getting the desired result.

Kindly let me know the solution.
Thanks in advance !!!!!

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 May 2011, 01:27 PM
Hi Parul,

You have to assign the two Styles respectively to the RowStyle and AlternateRowStyle properties of RadGridView.

I am not sure where did you manage to see an example of using TargetType="{x:Type telerikGridView:GridViewRow}"

All the best,
Ross
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Parul
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or