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

Custom Filtering Control

3 Answers 116 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 08 Sep 2011, 04:54 PM
I've created my own Filtering Control (class derived from FilteringControl) so that I can set a default FilterOperator to something other than Equal To. It works great, but it's using the default theme. My application uses the Office Blue theme, not the default Black theme. How do I get it to use the application's theme instead of the default?

I'm defining my class as a resource for the grid, then using it as a static resource for the column I want to change. Here is the related code for my grid:
<telerik:RadGridView.Resources>
     <common:ChangedFilteringControl x:Key="StartsWithFilterControl" DefaultFilter="StartsWith" />
</telerik:RadGridView.Resources>
.....
<telerik:GridViewDataColumn DataMemberBinding="{Binding Number}" FilteringControl="{StaticResource StartsWithFilterControl}" />

I'm guessing I need to apply a style but it's just not working.

3 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 13 Sep 2011, 12:04 PM
Hi Rayne,

 I have prepared an example project for you that illustrates how to achieve this. It is attached for your reference.

All the best,
Ivan Ivanov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Rayne
Top achievements
Rank 1
answered on 13 Sep 2011, 01:20 PM
Thank you. The sample you attached does not contain the filtering control class.
0
Rayne
Top achievements
Rank 1
answered on 23 Sep 2011, 02:03 PM
I guess I didn't look close enough...I didn't realize the custom filtering control was defined in MainWindow.xaml.cs.
It worked. Thanks again!
Tags
GridView
Asked by
Rayne
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Rayne
Top achievements
Rank 1
Share this question
or