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

Custom Filter Row

4 Answers 183 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 15 Jun 2015, 09:02 PM

Hi,

 

 I'm looking to use the RadGridView with a specfic use case for filtering.  We're in an MVVM setup, where filtering of the data rows is performed in the viewmodel rather than in the view.  However, I'd still like to use a filter row in this setup.  

 

Effectively, I want that filter row to be able to bind to our own FilterViewModel property in the view model that represents it.  Imagine this as just a TextBox for each column sitting in the filter row on top that is represented by a Dictionary<string,string> in the viewmodel: where the key is the column unique name, and the value is what the user entered for that textbox.  Behind the scenes, when this dictionary changes, we will perform the filtering ourselves.

 

As far as I understand it, this would require a custom filter control in the filter row of the RadGridView, and notification when the user changes a value in one of those filters.  However, it seems like it's impossible to use the filtering row or indicators of the RadGridView without using IFilterDescriptors or other Telerik-specific filtering items.  Is that true?  How could I make this scenario work?

 

 I'm able to do this to a certain extent with Infragistics controls -- we're evaluating Telerik to move over to and this is fairly critical to that process. 

 

 Thanks,

Alan

4 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 18 Jun 2015, 04:01 PM
Hi Alan,

As it turns out customizing the FilterRow does not suggest so many options compared to the Popup filter control. As a developer, you are not limited to the default filtering user interface provided by RadGridView when in Popup filtering mode. Please refer to the documentation on Custom Filtering Controls. You can also check Handing the actual Grid Filtering yourself topic where a sample project is attached.

In case you would like to use the built-in infrastructure, you can check this forum thread and download a test project demonstrating how to customize the default behavior for the editors in FilterRow.


Regards,
Dimitrina
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Alan
Top achievements
Rank 1
answered on 18 Jun 2015, 04:11 PM

[quote]Dimitrina said:
As it turns out customizing the FilterRow does not suggest so many options compared to the Popup filter control.
[/quote]

 So are you saying that using a custom filtering control (inheriting from IFilterControl) does not work when the filtering mode is FilterRow?

0
Accepted
Dimitrina
Telerik team
answered on 18 Jun 2015, 04:16 PM
Hello,

Yes, this is correct. It is also stated in the referred article.

Regards,
Dimitrina
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Alan
Top achievements
Rank 1
answered on 18 Jun 2015, 04:21 PM
Thanks!  Appreciate the help.
Tags
GridView
Asked by
Alan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Alan
Top achievements
Rank 1
Share this question
or