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. Image for the cookie policy date

Adding nodes using Key Board

Hi forum, Is it possible to add nodes in the treeViewAdv when a key is pressed and key down in which the text of the node should reflect the key that is used for adding the node. Thanks, Todd

1 Reply

DT Deepa TS Syncfusion Team April 7, 2006 12:43 PM UTC

Hi Todd, You could add nodes to the TreeViewAdv and get the key reflected to the text of the node that is being used for adding the nodes by handling the TreeViewAdv keyDown event handler. private void treeViewAdv1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { TreeNodeAdv node=new TreeNodeAdv("Node"+" "+e.KeyData.ToString()); this.treeViewAdv1.SelectedNode.Nodes.Add(node); Console.WriteLine("The "+node.Text+" "+"is added"); } Please take a look at the attached sample and let me know if this helps you. Thanks for your interest in Syncfusion products. Regards, Deepa.

AddNodesThroKey.zip

Loader.
Live Chat Icon For mobile
Up arrow icon