Editing nodes

Hi, How can I make the node text un editable. I want all the child nodes in the editable state and the user shouldnot be able to edit the parent''s node. Thanks, Regards, Tom

1 Reply

DT Deepa TS Syncfusion Team April 18, 2006 01:38 PM UTC

Hi Tom, You could use the TreeViewAdv''s BeforeEdit event for this purpose. TreeNodeAdvBeforeEditEventArgs.Node indicates the target node for editing.You could check if the node is the parentNode using the node''s HasChildren property and based on the result set the TreeNodeAdvBeforeEditEventArgs.Cancel property appropriately. private void treeViewAdv1_BeforeEdit(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvBeforeEditEventArgs e) { // Check if they are parent nodes if (e.Node.HasChildren) { MessageBox.Show("I am ParentNode"); e.Cancel = true; } } Please take a look at the attached sample and let me know if this helps you. Thanks for yor interest in Syncfusion products. Regards, Deepa.

UnEditNode.zip

Loader.
Up arrow icon