New to Telerik UI for ASP.NET AJAX? Download 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.

<telerik:RadTreeView RenderMode="Lightweight" 
function ClientNodeClicked(sender, eventArgs) 
    var node = eventArgs.get_node();
    alert("You clicked " + node.get_text());

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

function AssignEventHandler()
    var tree = $find("<%= RadTreeView1.ClientID %>");

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

function removeOnClicked2()
    var tree = $find("<%= RadTreeView1.ClientID %>");

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

In this article