Click or drag to resize
KaxTreeViewAllowNodeEditing Property
Gets a value indicating whether the text of the tree nodes are edinodele in the browser.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
public bool AllowNodeEditing { get; set; }

Property Value

Type: Boolean
Remarks

End-users can edit the text of tree-nodes by pressing F2 when the node is selected or by clicking on a node that is already selected (slow double click).

You can disable / enable node editing for specific tree nodes by setting the AllowEdit property of the specific KaxTreeNode.


After node editing, KaxTreeView fires the NodeEdit event and you can change the text of the node - the KaxTreeNode instance is contained in the NodeEdited property of the event arguments and the new text is in the NewText property of the event arguments.

Examples
[New Example]
<kaxT:KaxTreeView
    ID="KaxTree1"
    Runat="server"
    AllowNodeEditing="True"
    OnNodeEdit="HandleNodeEdit"
/>

Protected Sub HandleNodeEdit(ByVal sender As Object, ByVal NodeEvents As KaxTreeNodeEventArgs)
    Dim nodeEdited As KaxTreeNode = NodeEvents.NodeEdited
    Dim newText As String = NodeEvents.NewText

    nodeEdited.Text = newText
End Sub
[New Example]
<kaxT:KaxTreeView
    ID="KaxTree1"
    Runat="server"
    AllowNodeEditing="True"
    OnNodeEdit="HandleNodeEdit"
/>

protected void HandleNodeEdit(object sender, KaxTreeNodeEventArgs NodeEvents)
{            
    KaxTreeNode nodeEdited = NodeEvents.NodeEdited;
    string newText = NodeEvents.NewText;

    nodeEdited.Text = newText;
}
See Also