RadTreeView for ASP.NET AJAX

RadControls for ASP.NET AJAX

The OnClientNodeExpanded client-side event occurs after a parent node expands to display child nodes.

Caution

Calling the client-side expand() or set_expanded(true) method does not fire OnClientNodeExpanding and OnClientNodeExpanded client-side events. More information is available [!] here.

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.

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

The example below displays the text for the parent node and a count of child nodes.

CopyASPX
<script type="text/javascript" language="javascript">
    function ClientNodeExpanded(sender, eventArgs) {
        var node = eventArgs.get_node();
        alert("Parent node " +
                node.get_text() +
                " is expanded to show " +
                node.get_nodes().get_count()
                + " child nodes");
    }
</script>

<telerik:RadTreeView ID="RadTreeView1" runat="server" 
                     OnClientNodeExpanded="ClientNodeExpanded">
</telerik:RadTreeView>

See Also