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

Add a Node in edit mode by Default

The example given below uses the OnContextMenuItemClick and NodeEdit events in conjunction with client-side script to enable the requested functionality.

The result is:

After clicking the context menu item with text Create of a random TreeView Node, a Node with text default will be added as last root Node in the TreeView structure and will be in edit mode. The changes in the text made by the user are reflected in the NodeEdit event handler. Review the code snippet below for further details:

JavaScript
function HighlightNode(value) {
    var tree = $find("<%= RadTreeView1.ClientID %>");
    var node = tree.findNodeByValue(value);
    if (node != null) {
        node.startEdit();
    }
}

See Also

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