How can I force a node's text into edit mode?

On TreeViewAdv, if I set Node.LabelEdit = True then if a user selects a node and presses F2 it will go into edit mode where the user can edit the Node.Text.

How can I place an existing node into edit mode when the user (for example) clicks on a Rename button on a toolbar or toolstrip?


1 Reply

CR Chandran R Syncfusion Team November 29, 2012 04:30 AM UTC

Hi Bob,

 

Thanks for your interest in Syncfusion products.

 

You can achieve your requirement by using the following code snippet and  also I have attached a simple sample that demonstrates the same.

 

[c#]

 

    private void toolStripButton1_Click(object sender, EventArgs e)

       

                {

            this.treeViewAdv1.LabelEdit = true;

            SendKeys.Send(" {F2}");

           

        }

 

[sample link]

 

http://www.syncfusion.com/downloads/Support/DirectTrac/101563/Sample1602623992.zip

 

Please let us know if you need any other details.

 

Regards,

 

Chandran R


Loader.
Up arrow icon