New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Events Overview

RadTreeView supports a number of client-side events that let you customize behavior:

To use these events, write a javascript function that can be called when an event occurs. Then assign the name of the JavaScript function as the value of the corresponding RadTreeView event property.

ASPNET
<telerik:RadTreeView RenderMode="Lightweight" 
    ID="RadTreeView1" 
    runat="server"  
    OnClientNodeClicked="ClientNodeClicked">
</telerik:RadTreeView>

You can also assign event handlers in client-side code:

JavaScript
function AssignEventHandler()
{
	var tree = $find("<%= RadTreeView1.ClientID %>");
	tree.add_nodeClicked(ClientNodeClicked);
}	

Another advantage of the client-side API is that you can detach an event handler dynamically:

JavaScript
function removeOnClicked2()
{
	var tree = $find("<%= RadTreeView1.ClientID %>");
	tree.remove_nodeClicked(ClientNodeClicked);
}	

For a live example of using client-side events, see Client-Side Events Demo.

Not finding the help you need?
Contact Support