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

Adjusting filtered icon for all RadGridViews in an application

2 Answers 46 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Boardy
Top achievements
Rank 1
Veteran
Boardy asked on 25 Oct 2012, 08:58 AM
In my application I apply the Windows7 theme by setting
StyleManager.ApplicationTheme = new Windows7Theme();
in the creation of the main window.

Unfortunately it is not clear to the end-user which columns have filters on them, so I thought about styling it. I found this thread on the forum where some things are explained.

I set to work and copied DistinctFilterControl.xaml and GridViewHeaderCell.xaml from the Windows7 theme source directory and adjusted them to my satisfaction. I can apply the GridViewHeaderCellStyle to the column by using
<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource CustomGridViewHeaderCellStyle}"/>

So far so good. Now I want, of course, the style automatically applied to all data columns in my application. Is it possible to tweak this into the used theme? Or would it mean I have to create a complete new theme (e.g., Windows7bis)? Or is there a way to make a custom datacolumn that has this header style automatically applied? Or...

I don't want to end up with an application with half of the columns having my new style of funnel and the rest with the original themed funnel (because I forgot to set some property).

Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 30 Oct 2012, 07:30 AM
Hello Boardy,

In order to apply the style to all GridViewDataColums, make it implicit.  For implicit style you can remove the name attribute from the XAML . So then the style will be applicable to all control of specified Target Type.

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Boardy
Top achievements
Rank 1
Veteran
answered on 01 Nov 2012, 01:37 PM
Thx Yoan. This works as intended. It seems it's enough to do this for the DistinctFilterControl.xaml. I don't even need the GridViewHeaderCell.xaml any more.
Tags
GridView
Asked by
Boardy
Top achievements
Rank 1
Veteran
Answers by
Yoan
Telerik team
Boardy
Top achievements
Rank 1
Veteran
Share this question
or