Need some help about this one. I have a Telerik:RadGridView control and define the GridViewHeaderCell style of it in the resources
<Window.Resources>
<LinearGradientBrush x:Key="HeaderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFEBCD97" Offset="0.028"/>
<GradientStop Color="#FFC89C22" Offset="1"/>
<GradientStop Color="#FFC2AA39" Offset="0.452"/>
<GradientStop Color="#FFC49B2A" Offset="0.676"/>
<GradientStop Color="#FFCCB073" Offset="0.404"/>
<GradientStop Color="White" Offset="0"/>
</LinearGradientBrush>
<Style TargetType="{x:Type telerik:GridViewHeaderCell}" x:Key="HeaderStyle">
<Setter Property="Background" Value="{DynamicResource HeaderBrush}" />
</Style>
</Window.Resources>
But I can’t access the HeaderStyle in my RadGridView to set the style of it
<telerik:RadGridView Name="radGridView1" HeaderCellStyle="{StaticResource HeaderStyle}" Loaded="radGridView1_Loaded_1"/>
This is a WPF Application and is there HeaderCellStyle property of RadGridView in WPF? Or am I missing telerik library that needs to be referenced? Thanks in advance.
The HeaderCellStyle is present in RadControls for WPF RadGridView. But its supported on a GridViewDataColumn or GridViewColumn level. Its not available on RadGridView level. You would need to add explicitly the gridview columns for your rad grid view and then add the headercellstyle. Here is what i was able to put together quickly.
I have used the same styling you have provided and applied it to each column headers.
Here is the output:
Hope i was able to answer your question
Lohith (Tech Evangelist, Telerik India)