I am using a RadTreeView & the tree menu is data sourced. On the server side when I try to grab the nodes using
foreach (RadTreeNode node in RadTreeView1.Nodes)
This provides only the root nodes (the ones at the higher level). All of the nodes have quite few child node & subfolders (which again contain child nodes). How can I scroll thru all the nodes in the tree?
8 Answers, 1 is accepted
The experienced behavior is the default one since the Nodes collection of the RadTreeView is only giving the root nodes.
Please try the GetAllNodes method of the RadTreeView, which returns a linear list of all nodes.
the Telerik team
I am trying to attach the context menu at each node dynamically.
I am not using "GetAllNodes" but was able to get the nodes for each root node as below & calling this routine recursively.
foreach (RadTreeNode n in nodes)
The problem is when I am trying to set the ContextMenu option for the child nodes. It doesnt provide the method to set the ContextMenu on child nodes. Not sure if "GetAllNodes" makes any difference there.
Can you please provide example how can I attach the context menu to child nodes for each root node. Below is the code I am currently trying & is not working. I didnt find any method which allows to set "ContectMenu" option, once inside the root node, at child node level.
Please refer to the following help article showing how to add context menus dynamically.
the Telerik team
I need get all child nodes but in javacript, how can i do it?
You can try the following to find the child nodes of each parent node. Here I tried in the NodeDoubleClick event.
Thanks for your reply your code helped me a lot :D
But now i have other problem, i need to know if a node have child is possible in js?