This is a migrated thread and some comments may be shown as answers.
Using NodeTemplate
1 Answer 38 Views
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 26 Jun 2009, 08:40 AM
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

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Jun 2009, 08:50 AM
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.
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Share this question
or