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

Editing error in tree

Thread ID:





44829 Jun 5,2006 09:43 AM UTC Jun 5,2006 10:37 AM UTC WinForms 1
Tags: Tools
Administrator [Syncfusion]
Asked On June 5, 2006 09:43 AM UTC

I use pop up menu with tree. Setting labeledit to true makes all the nodes to be in the editable mode if F2 is pressed. I want to edit the particular node only with pop up menu. Thanks in advance. Mari

Deepa TS [Syncfusion]
Replied On June 5, 2006 10:37 AM UTC

Hi Mari, Thanks for using Syncfusion products. You can edit the particular node only with popup menu by using the popupMenusManager and by disabling the editing behavior once the editing operation is completed using TreeViewAdv NodeEditorValidated event. TreeNodeAdv editedNode = null; //Handling the TreeViewAdv''s MouseDown event in the following way,will help you in getting the selected node''s PopupMenu when right clicked. private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == MouseButtons.Right) { // get the point where the mouse was right clicked Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); // get the node at the right click point editedNode = this.treeViewAdv1.PointToNode(p); this.treeViewAdv1.SelectedNode=editedNode; } } //The TreeViewAdv''s BeginEdit method makes the selected node editable. private void barItem1_Click(object sender, EventArgs e) { if (this.editedNode != null) { this.treeViewAdv1.SelectedNode = this.editedNode; this.treeViewAdv1.LabelEdit = true; this.treeViewAdv1.BeginEdit(); } } //Disable the editable behavior ,once the editing operation is over. private void treeViewAdv1_NodeEditorValidated(object sender, Syncfusion.Windows.Forms.Tools.TreeNodeAdvEditEventArgs e) { this.treeViewAdv1.LabelEdit=false; } Please take a look at the attached sample and let me know if this helps you. 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.

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