RadTreeView for ASP.NET

Getting the NavigateUrl on the client-side Send comments on this topic.
Example scenarios (How to) > Client -side > Getting the NavigateUrl on the client-side

Glossary Item Box

The NavigateUrl property is not exposed to the client-side RadTreeNode instance. Therefore, if you need to get the url assigned to the TreeNodes, you should use the following approach:

Example:

ASPX Copy Code
<script>
   
function ClickHandler(node)
   {
       var nodeDIV = document.getElementById(node.ClientID);
       var link = nodeDIV.getElementsByTagName("A");
       alert(link[0].href);
   }
</script>

<
rad:RadTreeView ID="RadTreeView1" runat="server" BeforeClientClick="ClickHandler">
   
<Nodes>
       
<rad:RadTreeNode runat="server" Text="New Item1" NavigateUrl="http://www.telerik.com">
       </rad:RadTreeNode>
       
<rad:RadTreeNode runat="server" Text="New Item2" NavigateUrl="http://www.google.com">
       </rad:RadTreeNode>
   
</Nodes>
</
rad:RadTreeView>