New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

OnClientNodeEditStart

The OnClientNodeEditStart client-side event is called as the edit begins. This event can not be canceled.

You can use this event to set any properties of the input area of the edited node.

The event handler receives parameters:

  1. The TreeView instance that fired the event.

  2. Event arguments with functions:

  3. 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.

  • You can call get_inputElement() from this node reference to get the INPUT area of the edited node

  1. get_domEvent() retrieves a DOM event object of the node edit.

The example below uses the OnClientNodeEditStart event to change the text displayed in the INPUT area.

We will achieve the following: when you edit a node like Drafts (2) you will not see the (2) in the INPUT area, but only the real text like below. We will use the OnClientNodeEdited event to restore the number (2) to the original text upon saving.

RadTreeView Edit

ASPNET
<telerik:RadTreeView RenderMode="Lightweight" ID="RadTreeView1" 
    OnClientNodeEditStart="OnClientNodeEditStartHandler"
    OnClientNodeEdited="OnClientNodeEditedHandler" 
    Skin="Office2007" 
    AllowNodeEditing="true"
    runat="server">
...
</telerik:RadTreeView>

This event is available in all versions after Q3 SP2 2008 release.

See Also

In this article
See Also
Not finding the help you need?
Contact Support