RadTreeView for ASP.NET AJAX

RadControls for ASP.NET AJAX

When using Templates for the Nodes of a RadTreeView, editing of the Text of these Nodes becomes a complicated task.

The approach demonstrated in the example below is an elegant way to edit Node Text, save it in a database and then populate the TreeView with the new data.

Example:

This example shows a TreeView that is bound to a database. It uses Templates for its Nodes. The Template displays the Text of Nodes using the DataBinder.Eval expression.

CopyASPX
<telerik:RadTreeView ID="RadTreeView1" runat="server" AllowNodeEditing="true" OnNodeEdit="RadTreeView1_NodeEdit">
    <NodeTemplate>
        node text:
        <%# DataBinder.Eval(Container.DataItem"Text") %>
    </NodeTemplate>
</telerik:RadTreeView>