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


The OnClientNodeChecking client-side event occurs when the user selects a checkbox using mouse or keyboard. The checked state returned by the node get_checked() function has not changed to reflect the new value. The event is called just prior to postback or URL redirection and can be canceled.

The event handler receives parameters:

  1. The TreeView instance that fired the event.

  2. Event arguments with functions:

  • get_node() retrieves a reference to the clicked on node.

  • set_cancel() call this function to specify whether the event should be canceled (true) or not (false).

  • get_domEvent() retrieves a DOM event object of the node check.

The example below shows how to cancel the event if the category for the node is "NonCheckable". Note that the OnClientNodeChecked event does not fire if set_cancel(true) is called.

<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1" runat="server" CheckBoxes="true" OnClientNodeChecked="ClientNodeChecked"
function ClientNodeChecked(sender, eventArgs) {

function ClientNodeChecking(sender, eventArgs) {
    var node = eventArgs.get_node();

    alert("You are going to check " +
node.get_text() +
". Current state is: " +

    if (node.get_category() == "NonCheckable") {

See Also

In this article