@model IEnumerable<TreeViewData>

<h1>
    Editing Nodes
</h1>

<p>
    The <b>TreeView</b> control provides editing support. Set the
    <b>isReadOnly</b> property to false and users will be able to
    edit the content of the nodes by pressing the F2 key.
</p>
<p>
    Edits made to node contents are automatically applied to the
    items in the <b>itemsSource</b> array using the properties
    specified by the <b>displayMemberPath</b> property.
</p>
<p>
    You may customize the editing behavior using the following events:
    <b>nodeEditStarting</b>, <b>nodeEditStarted</b>,
    <b>nodeEditEnding</b>, and <b>nodeEditEnded</b>.
</p>
<p>
    In the example below, we enable editing only for nodes that
    contain no children. To edit, select a node and press F2:
</p>

@Html.C1().TreeView().Id("theTree").Bind(Model).DisplayMemberPath("Header").ChildItemsPath("Items")