Home > DeveloperSection > Blogs > treeview control add with combobox with the help of textbox

treeview control add with combobox with the help of textbox


C# C# 
Ratings:
1 Comment(s)
 3575  View(s)
Rate this:

https://www.mindstick.com/Articles/427/how-to-use-tree-view-control-in-c-sharp

The above link project details is perfectly ok. but i want some changes in that. if u select any node in the treeview at that time u enter the node name into textbox that node will be added to present selected node. so if select any node that node will be displaying purpose of the combo box.

so if u enter any parent or child node that nodes will be stored in the combo box.using windows application form
i think it supports the database connection also. plz help me.................


thank you................
k v sunil kumar

Re: treeview control add with combobox with the help of textbox

By AVADHESH PATEL on   3 years ago

Hi K V Sunil!

If you want to populate data into combo box on node selection or on node click, then used _NodeMouseClick event of tree view as below

private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
    cmbNode.Items.Add(e.Node.Text);
}

I hope it resolve your problem


Don't want to miss updates? Please click the below button!

Follow MindStick