New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientNodeEditing
The OnClientNodeEditing client-side event is called when editing is completed and before the OnClientNodeEdit event fires. This event 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 node being edited. You can call get_text() from this node reference to get the "old" text prior to editing.
-
get_newText() returns the new text entered by the user.
-
get_domEvent() retrieves a DOM event object of the node edit.
-
set_cancel() - call this function to specify whether the event should be canceled (true) or not (false).
The example below demonstrates preventing non-numeric entry to a node.
ASPNET
<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1"
runat="server"
AllowNodeEditing="True"
OnClientNodeEditing="ClientNodeEditing">
</telerik:RadTreeView>