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

filtering funnel onclick event

2 Answers 82 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hector Hernandez
Top achievements
Rank 1
Hector Hernandez asked on 13 Oct 2011, 11:59 AM
I need to know when the user clicks on the  filtering funnel button and the filtering window is about to open. Is there any event I can attach to without creating my own filter template? I just need to know when a user is clicking there and that's it.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 13 Oct 2011, 12:30 PM
Hello Hector,

The "funnel path" is actually the content of a ToggleButton, which is named as "PART_DropDownButton" in the template. Try searching for them in the visual tree and subscribe to their Click event. You may achieve this like this:
clubsGrid.ChildrenOfType<ToggleButton>().Where(tb => tb.Name == "PART_DropDownButton");

Ivan Ivanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Hector Hernandez
Top achievements
Rank 1
answered on 13 Oct 2011, 02:02 PM
Hi Ivan, thanks for the super fast answer.
I am indeed using your approach:
var x = ScenariosGrid.ChildrenOfType<ToggleButton>().Where(tb => tb.Name == "PART_DropDownButton");

but this is not returning any related control.
Now, I tryied also:
var x = ScenariosGrid.ChildrenOfType<ToggleButton>();
with no success, and finally:
var x = ScenariosGrid.ChildrenOfType<Control>().Where(tb => tb.Name == "PART_DropDownButton");

all of them with no result whatsoever.
In a Final attempt I tried to do this
GridViewCheckBoxColumn column = ScenariosGrid.Columns["Succeeded"] as GridViewCheckBoxColumn;
var y = column.FindChildByType<ToggleButton>();

again with no successful result. In fact, the latest code chunk throws back an exception.

Thanks for any support! will keep testing.
Tags
GridView
Asked by
Hector Hernandez
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Hector Hernandez
Top achievements
Rank 1
Share this question
or