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

Inheriting style in GridViewHeaderCell

1 Answer 80 Views
This is a migrated thread and some comments may be shown as answers.
Deepak N
Top achievements
Rank 1
Deepak N asked on 13 Aug 2009, 08:03 AM
Hi ,

I am not able to inherit/override style for telrik:GridViewHeaderCell

 I have Common ResourceDictionary  Style.Xaml , it has

<ResourceDictionary xmlns:telerik="">
    <Style TargetType="telerik:GridViewHeaderCell">
        <Setter Property="FontWeight" Value="ExtraLight" />
        <Setter Property="FontStyle" Value="Normal" />

Im MyControl.Xaml I have

        <Style x:Key="CheckBoxHeaderCellStyle"  TargetType="telerik:GridViewHeaderCell">
            <Setter Property="Template">
                    <ControlTemplate TargetType="telerik:GridViewHeaderCell">
                        <CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"/>
In code behind I am using

 var dict = new ResourceDictionary
                               Source = new Uri("MyApp;component/View/styles.xaml", UriKind.Relative)

I apply style in GridDataColumn as

<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource CheckBoxHeaderCellStyle}"/>

In design mode I can see the checkbox in Grid Header.But It does not show a check box in GridHeader.

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 19 Aug 2009, 07:26 AM
Hi Deepak N,

I've just tried this however everything worked fine - you can check the attached project.

Sincerely yours,
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Asked by
Deepak N
Top achievements
Rank 1
Answers by
Telerik team
Share this question