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

RAD GRID with Custom Filtering Control

2 Answers 119 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Krishna
Top achievements
Rank 1
Krishna asked on 08 Dec 2011, 05:10 AM
Hi,

As i was trying to create user control(Filtering) and want to attache with RAD GRID. Perhaps it's done but my events for Filtering is not getting fired. Can any one provide a small example for this with source code.

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Dec 2011, 08:35 AM
Hello,

 These events are fired from default filtering controls. When you have custom filtering control you have full control of when and how the filtering will be applied. You do not need events. 

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Krishna
Top achievements
Rank 1
answered on 08 Dec 2011, 10:01 AM
Hello,

Thanks for a quick response.

Here is what I am trying to achieve:

I have designed a custom filter control and my filtering logic is in my view model (the view model is set as datacontext to the page that hosts my grid).

When I click on Filter button in my custom filter editor, I want to raise the OnFiltering event on the grid so that I can call a method on my view model that hits the database to get the records by applying the filter.

Is this possible ?

private void dataGrid1_Filtering(object sender, Telerik.Windows.Controls.GridView.GridViewFilteringEventArgs e)
        {
              
            // Call a method on the View model to apply filtering and rebind the grid
        }

We observe the the Filtering event doesn't get fired when we attach a custom filter editor !! On the other hand, this event is raised when we go with the default editor.

FYI - The custom filter editor is the one from Rad WPF samples :)

Any help is much appreciated.

Regards,
Krishna
Tags
GridView
Asked by
Krishna
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Krishna
Top achievements
Rank 1
Share this question
or