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: how do I programmatically set an active tree node in labeledit mode?

Thread ID:

Created:

Updated:

Platform:

Replies:

36744 Nov 9,2005 12:03 PM UTC Nov 10,2005 05:46 AM UTC WinForms 3
loading
Tags: Tools
Jessy Liu
Asked On November 9, 2005 12:03 PM UTC

Hi, I am aware that you can click on a tree label or press F2 and edit it. However, I''d like to be able to do something like Right-Click on the node and select Rename and then be in editing mode. Please can you tell me what call I can make to the tree to put the active node in edit mode or how I can achieve this. Thanks!

Deepa TS [Syncfusion]
Replied On November 9, 2005 02:02 PM UTC

Hi Jessy, The following code snippet will indicate the node on which the user do a right-mouse down and helps in indicating the node which is been edited. this.rightMouseDownNodeCached=this.treeViewAdv1.RMouseDownNode; Console.WriteLine(rightMouseDownNodeCached.Text); Please take a look at this sample. http://www.syncfusion.com/Support/user/uploads/right click edit_ba3e9eb7.zip And let me know if this meets your requirement. Thanks for your interest in Syncfusion products. Thanks for your patience. Regards, Deepa.T.S

Jessy Liu
Replied On November 9, 2005 02:19 PM UTC

Hi Deepa, Thanks for the quick reply. I''m not too concerned about finding the active node at present but would like to know how to set it into edit mode. The right click was an example. I will also want to have a menu item command that would set the active node into edit/rename mode. Thanks, -- Jessy

Deepa TS [Syncfusion]
Replied On November 10, 2005 05:46 AM UTC

Hi jessy, Thanks for the information.The node can be edited with the help of the BeginEdit() method. In Click event: private void button1_Click(object sender, System.EventArgs e) { this.treeViewAdv1.BeginEdit(this.treeViewAdv1.SelectedNode); } In MenuItem command: private void menuItem2_Click(object sender, System.EventArgs e) { if(this.rightMouseDownNodeCached != null) this.treeViewAdv1.BeginEdit(this.rightMouseDownNodeCached); } The node which is been passed in the arguments of the BeginEdit method will be in the edit mode. Please take a look at the modified sample http://www.syncfusion.com/Support/user/uploads/right click edit_59276e0e.zip And let me know if this meets your requirement. Thanks for your continued interest in Syncfusion products. Thanks for your patience. Regards, Deepa.T.S

CONFIRMATION

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.

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

;