Hello to All,
I have Master Detail form where in a Form I have a combbox1 and in the DataGridview I have another combobox2, I want that use the first combobox1 selection based value in second combobox.
e.g,
Select Class_ID, Enrollment_ID, Student_name from Enrollment_Table where Class_ID = combobox1.Valuemember;
I want to populate Student Name in combobox2.
How should I start, hope any one will guide me to solve this issue.
Thanks,
Saqib
Loading
paul danielPosted Jan 11, 2010, 8:52 AM
Try this code
cmd=new sqlcommand("ur query");
get d resutl in first combobox and related name will display in second combobox
while (myReader.Read())
{
combobox2.Items.Add(myReader ["Name"]);
}
Thanks,
Paul daniel
Lalit MPosted Jan 9, 2010, 11:49 AM
hi,Saqib...
here same q/a related your question you will get solution from this link
http://www.daniweb.com/forums/thread147241.html