New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientNodeClicking
The OnClientNodeClicking client-side event occurs when the user clicks on a node, before the RadTreeView responds to the mouse click. When using keyboard navigation the event is fired after pressing Enter. The event is called just prior to postback or URL redirection and can be canceled.
The event handler receives parameters:
-
The TreeView instance that fired the event.
-
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 click.
The example below shows how to cancel the event if the text of the node is "Search"
ASPNET
<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1" runat="server" OnClientNodeClicking="ClientNodeClicking">
</telerik:RadTreeView>