KaxTreeViewAllowNodeEditing Property |
Namespace: Kettic.AspNet.Controls
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.
<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
<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; }