New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Changing the Text of Tree Nodes

The client-side API of Telerik RadTreeView for ASP.NET AJAX provides the get_textElement() function that returns the instance of the text element of a particular node.

For example, the following JavaScript changes the first node of the TreeView to "new text":

//RadTreeView1 is the server-side treeview object
var tree = $find("<%= RadTreeView1.ClientID %>");
tree.get_nodes().getNode(0).get_textElement().innerHTML = "new text"; 

The changes however will not be persisted after post-back.

See Also

In this article