filtering funnel onclick event

3 posts, 0 answers
  1. Hector Hernandez
    Hector Hernandez avatar
    4 posts
    Member since:
    Mar 2011

    Posted 13 Oct 2011 Link to this post

    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. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1216 posts

    Posted 13 Oct 2011 Link to this post

    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 >>
  3. Hector Hernandez
    Hector Hernandez avatar
    4 posts
    Member since:
    Mar 2011

    Posted 13 Oct 2011 Link to this post

    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.
Back to Top