i am beginner to .net and i want to put selected node string to a textbox. May be it is not possible to do with treeview control because it has no use in application.
ps I tried to insert choices in listcheckbox control on a button click, may be this thing is also not possible.
Do you have another way of doing this
The TreeView control has an event called
AfterSelect.You can use this event to detect when an item has been selected.
Here’s a sample code:
Of course, you will need to change
TreeView1andTextBox1for the actual names of your treeview and textbox controls.To add items to a
CheckedListBoxwhen a button is clicked, you would use a code similar to this one:This code will add a new item to
CheckedListBox1, using the text from theTextBox1control as input, whenButton1is clicked.