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

[Solved] Header Background Color

5 Answers 194 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.
Ketaki
Top achievements
Rank 1
Ketaki asked on 31 Aug 2010, 08:48 AM

Hello,

How I make to modify background color of header in gridview? Im using SL4 and telerik latest binaries which is compatible with SL4.

Thanks in advances

5 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 31 Aug 2010, 08:57 AM
Hi Ketaki,

You can achieve this by using the HeaderCellStyle property of the GridViewColumn:

<UserControl.Resources>
    <Style TargetType="telerik:GridViewHeaderCell" x:Key="myRedHeaderStyle">
        <Setter Property="Background" Value="Red" />
    </Style>
</UserControl.Resources>
  
<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}" 
  HeaderCellStyle="{StaticResource myRedHeaderStyle}"/>

Hope this helps.

Greetings,
Veselin Vasilev
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
0
Ketaki
Top achievements
Rank 1
answered on 31 Aug 2010, 12:08 PM
Hello,

I have use you solution but it is not allow me change the background of header.
How can i change the background of header grid?

I have attached the screen shot

Thanks in advance
0
Veselin Vasilev
Telerik team
answered on 31 Aug 2010, 12:16 PM
Hi Ketaki,

Please check this help topic on the matter:

Styling the Header Row

If you face any other problems - let us know and we will help you right away.

All the best,
Veselin Vasilev
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
0
Michael MSTG
Top achievements
Rank 1
answered on 10 Sep 2010, 08:12 PM
can you post the relevant XAML?

I do not have access to blend.
0
Veselin Vasilev
Telerik team
answered on 14 Sep 2010, 02:13 PM
Hi Michael,

Please find attached a sample project.

Hope it will get you started.

All the best,
Veselin Vasilev
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
Ketaki
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Ketaki
Top achievements
Rank 1
Michael MSTG
Top achievements
Rank 1
Share this question
or