Question on Custom Filter of RadGridView

3 posts, 1 answers
  1. dttanh
    dttanh avatar
    13 posts
    Member since:
    Aug 2012

    Posted 22 Mar 2012 Link to this post

    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. Answer
    Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 23 Mar 2012 Link to this post

    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 >>
  3. dttanh
    dttanh avatar
    13 posts
    Member since:
    Aug 2012

    Posted 23 Mar 2012 Link to this post

    That helps us. Thanks!
Back to Top