The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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!
DTDeepa TS Syncfusion Team 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
JLJessy LiuNovember 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
DTDeepa TS Syncfusion Team 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