I would like to modify the GridViewHeaderCellTemplate in such a way that it applies to all themes.
I would like to define the ControlTemplate only, and have the styles inherited from whatever theme happens to be loaded.
Is this possible?
I would like to define the ControlTemplate only, and have the styles inherited from whatever theme happens to be loaded.
Is this possible?
3 Answers, 1 is accepted
0
Hello Ari,
What I would do in your case is use the Header property of the column and insert my custom layout. This way the themes will continue to apply automatically.
Try it out and let me know how it goes.
All the best,
Kalin Milanov
the Telerik team
What I would do in your case is use the Header property of the column and insert my custom layout. This way the themes will continue to apply automatically.
Try it out and let me know how it goes.
All the best,
Kalin Milanov
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

Ari
Top achievements
Rank 1
answered on 16 Jul 2010, 02:46 PM
Thank you for your reply.
But how do I reference resources from the theme in a generic way?
For example, I would like to continue to use the GridView_HeaderBackground style, yet it should inherit it from the current theme.
Is this possible?
But how do I reference resources from the theme in a generic way?
For example, I would like to continue to use the GridView_HeaderBackground style, yet it should inherit it from the current theme.
Is this possible?
0
Hello Ari,
Let's say you want to place a grid with 2 rows and 2 columns in the header and you want to have some text and buttons and maybe a combo in it as well. Using the header property of the column you do the following:
This way you will both have your logic and layout AND keep the themes.
Sincerely yours,
Kalin Milanov
the Telerik team
Let's say you want to place a grid with 2 rows and 2 columns in the header and you want to have some text and buttons and maybe a combo in it as well. Using the header property of the column you do the following:
<
telerik:GridViewDataColumn.Header
>
<
Grid
Margin
=
"0,3"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
TextBlock
Text
=
"Text1"
VerticalAlignment
=
"Center"
/>
<
TextBlock
Text
=
"Text2"
Grid.Row
=
"1"
VerticalAlignment
=
"Center"
/>
<
telerik:RadButton
Content
=
"Button1"
Grid.Column
=
"1"
Margin
=
"0,1"
/>
<
telerik:RadComboBox
Grid.Column
=
"1"
Grid.Row
=
"1"
SelectedIndex
=
"1"
Margin
=
"0,1"
>
<
telerik:RadComboBoxItem
Content
=
"Item1"
/>
<
telerik:RadComboBoxItem
Content
=
"Item2"
/>
<
telerik:RadComboBoxItem
Content
=
"Item3"
/>
<
telerik:RadComboBoxItem
Content
=
"Item4"
/>
<
telerik:RadComboBoxItem
Content
=
"Item5"
/>
<
telerik:RadComboBoxItem
Content
=
"Item6"
/>
<
telerik:RadComboBoxItem
Content
=
"Item7"
/>
<
telerik:RadComboBoxItem
Content
=
"Item8"
/>
</
telerik:RadComboBox
>
</
Grid
>
</
telerik:GridViewDataColumn.Header
>
This way you will both have your logic and layout AND keep the themes.
Sincerely yours,
Kalin Milanov
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