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

[Solved] Alternate Group Header style

1 Answer 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jmj1459
Top achievements
Rank 1
jmj1459 asked on 20 Oct 2010, 03:53 AM
Is it possible to style alternating group headers differently in a Gridview (similar to styling alternating rows differently)? If so, how?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 22 Oct 2010, 11:25 AM
Hello John,

RadGridView does not expose such properties for the GroupHeader similar to the following that are used in GridViewRows. On the other hand I would suggest you to create your own GroupHeaderTemplate following this markup:

<telerik:RadGridView x:Name="radGridView1">
  <telerik:RadGridView.GroupHeaderTemplate>
    <DataTemplate>
        <TextBlock Text="{Binding Group.Key}"/>
    </DataTemplate>
  </telerik:RadGridView.GroupHeaderTemplate>
</telerik:RadGridView>

You can place this TextBlock in a Border element and set its Background property to the brush you want to use. I suppose that there is something specific in your scenario and it could be great if you can share with us a little bit more info about the desired final result.
 
Greetings,
Vanya Pavlova
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
jmj1459
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or