I am using the RadtreeView control in a ASP.Net webform. Depending on the data, I might display a tree with 1 branch or a Hierarchy tree with many branches and sub branches. Then the user will click on the node they want to select and the form will capture which node the user selected.
Everything works fine if the control shows only 1 branch with many nodes.
However, if the tree is showing a hierarchy with many branches and many nodes under each branch, and the user clicks on their choice of node, the return value is always a 0, 1 or 2. There are 3 main branches in the hierarchy so I assume the return value is the value of the main branch of the node that was selected.
How can I get the RadTreeView to always return the index number of the node I selected? Here is the click event that captures the user selection:
Everything works fine if the control shows only 1 branch with many nodes.
However, if the tree is showing a hierarchy with many branches and many nodes under each branch, and the user clicks on their choice of node, the return value is always a 0, 1 or 2. There are 3 main branches in the hierarchy so I assume the return value is the value of the main branch of the node that was selected.
How can I get the RadTreeView to always return the index number of the node I selected? Here is the click event that captures the user selection:
protected void RadTreeView1_ContextMenuItemClick(object sender, Telerik.Web.UI.RadTreeViewContextMenuEventArgs e) { HierarchyItem = e.Node.Index; if (HierarchyItemSelected != null) HierarchyItemSelected(this, EventArgs.Empty); } }