We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Editing nodes

Thread ID:





43187 Apr 18,2006 03:46 AM Apr 18,2006 09:38 AM Windows Forms 1
Tags: Tools
Administrator [Syncfusion]
Asked On April 18, 2006 03:46 AM

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

Deepa TS [Syncfusion]
Replied On April 18, 2006 09:38 AM

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.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.