hello everyone,
i am creating visual c# desktop application.
i have two table 1) Department Master
dept_id int primarykey,
dept_name varvhar(50).
another table is below:-
2) Contactperson Master
cont_id int primarykey,
dept_id int,
cont_name varchar(50).
now in windows form I put Two Different Combobox like, department combobox and contactperson combobox.
now when I select departmentname from department combobox then the releted data of contact person will show in contactpersonmaster.
pls help me.
Loading

Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 30, 2016, 1:11 AM EDT
Vasanth NatarajanRank #3,352 · 429 reputationPosted Aug 30, 2016, 1:27 AM EDT
department .SelectionChanged += new SelectionChangedEventHandler(department _SelectionChanged); void department_SelectionChanged(object sender, SelectionChangedEventArgs e) { comboBox2.DataSource = contactperson_master;//get the below query data comboBox2.DisplayMember="cont_id"; comboBox2.ValueMember="cont_name";}
Bikesh SrivastavaRank #108 · 20.3K reputationPosted Aug 30, 2016, 2:46 AM EDT