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

Any way to trigger the opening of a given columns filter input?

2 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Austin
Top achievements
Rank 1
Austin asked on 28 Aug 2011, 12:37 AM
Is there a way programmaticly open a given columns filter input?

2 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 29 Aug 2011, 12:32 PM
Hello Austin,

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

You can find it attached.

All the best,
Ross
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
Rossen Hristov
Telerik team
answered on 29 Aug 2011, 03:16 PM
Hello Austin,

I forgot the project. Here it is.

This is the important part:

private void Button1_Click(object sender, RoutedEventArgs e)
{
    var nameHeaderCell = this.clubsGrid
        .ChildrenOfType<GridViewHeaderCell>()
        .Where(headerCell=>headerCell.DataColumn.UniqueName == "Name").FirstOrDefault();
     
    if (nameHeaderCell != null)
    {
        var f = nameHeaderCell.ChildrenOfType<FilteringDropDown>().FirstOrDefault();
        if (f != null)
        {
            f.IsDropDownOpen = true;
        }
    }
}

All the best,
Ross
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 >>

Tags
GridView
Asked by
Austin
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or