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

Question on Custom Filter of RadGridView

2 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
dttanh
Top achievements
Rank 1
dttanh asked on 22 Mar 2012, 09:15 AM
I have created a customized filter control which using usercontrol as a content, 
i have followed by this link to do this : http://blogs.telerik.com/blogs/posts/10-01-22/how-to-customize-radgridview-s-default-filtering-control-with-attached-behaviors-silverlight-amp-wpf.aspx. But at runtime, i cannot find Popup to close this filter. Then also  i created a usercontrol with popup, but when clicking on filter of grid, this filter did not show up. How can i implement this?

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 23 Mar 2012, 09:26 AM
Hello,

Inside the filtering control you know the respective column. So here is one possible approach:

private void Button_Click(object sender, RoutedEventArgs e)
{
    var headerCell = this.column.DataControl.ChildrenOfType<GridViewHeaderCell>()
        .Where(hc => hc.Column == this.column)
        .Single();
 
    headerCell.ChildrenOfType<FilteringDropDown>().Single().IsDropDownOpen = false;
}


I have attached a sample project that demonstrates one possible approach.

Regards, Ross
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
dttanh
Top achievements
Rank 1
answered on 23 Mar 2012, 11:17 AM
That helps us. Thanks!
Tags
GridView
Asked by
dttanh
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
dttanh
Top achievements
Rank 1
Share this question
or