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

Changing Header Row Background

1 Answer 203 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 02 Mar 2011, 02:45 PM
I'm trying to change the default colour of the header row on the expression dark theme of the grid view. I've edit a copy of the default style, but no matter what colours I change the background remains the same dark grey. I've managed to find and change the colours of the cells that make up the column headings. However there is a section remaining that isn't a column heading, just empty space on the right of all the column headings. Has anyone had any success in changing this default colour? 

The most obviously thing to change would be the value of the background in 

<SolidColorBrush x:Key="GridView_HeaderRowBackground" Color="#FF2D2E32" />

But this has no affect, even if I make it a bright red just as a test. Even attempting to hard code a value in the border has no effect.

<Border x:Name="PART_GridViewHeaderRowBorder" 
Background="Red"
BorderBrush="{TemplateBinding BorderBrush}" 
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Padding="{TemplateBinding Padding}"
Grid.ColumnSpan="4" 
BorderThickness="{TemplateBinding BorderThickness}">
</Border>

1 Answer, 1 is accepted

Sort by
0
Accepted
Vanya Pavlova
Telerik team
answered on 07 Mar 2011, 08:27 AM
Hi Mark,


If you need to change the background of GridViewHeaderRow, you have the following options:

1.Create a simple style.
2.Edit the template of this part in Blend and apply this style explicitly  in RadGridView.

Can you verify that you have defined a style for GridViewHeaderRow? Unfortunately in case of implicit style with TargetType GridViewHeaderRow the style would not be applied and we are aware of this issue.


Please check the attached project and let me know how I can assist you further.

 
Best wishes,
Vanya
the Telerik team
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Share this question
or