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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeViewAdv Readonly

Thread ID:





65793 Jul 27,2007 11:04 AM UTC Aug 3,2007 09:13 AM UTC General Discussion 1
Tags: General Discussion
Asked On July 27, 2007 11:04 AM UTC


I want to set Syncfusion.Windows.Forms.Tools.TreeviewAdv into readonly, can anybody help me?

Jeba S [Syncfusion]
Replied On August 3, 2007 09:13 AM UTC

Hi K.J,

Thank you for posting query to us.

Disable Editing
If your intention is to disable editing inTreeViewAdv, you can prevent editing by handling the Before Edit event and set the e.Cancel property to true.

private void treeViewAdv1_BeforeEdit(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvBeforeEditEventArgs e)
//Let us prevent editing the top-level nodes.
if(e.Node.Parent == this.treeViewAdv1.Root)
e.Cancel = true;
MessageBox.Show("Node editing canceled for top-level nodes in the BeforeEdit event handler.");

//Prevent editing in all nodes
e.Cancel = true;

Disable drag and drop
If your intention is to disable drag and drop, you can achieve this using the AllowDrop property.

this.treeViewAdv1.AllowDrop = false;

If I have misunderstood your requirement, could you please explain me in detail, so that I can work in further and try to send a better solution?

Please refer the sample in the below link and let us know if this helps.

Thank you for using Syncfusion Products.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon