Using NodeTemplate

2 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 26 Jun 2009 Link to this post

    I have a node template which has a number of image buttons on it.

    Is there an easy way of getting the node  on which the buttons reside on the click event? More generically, is there a way of getting the parent node of any controls in the NodeTemplate on their click event?

    --
    Stuart
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 26 Jun 2009 Link to this post

    Hello Stuart,

    The node would be one of the parent controls (if not the first Parent) depending on your template. So you can do this:

    RadTreeNode node = (RadTreeNode)imageButton.Parent;

    If you have deeper nesting you should traverse the parent controls until you find the tree node.

    Greetings,
    Albert
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top