Solved

winform combo relationship

Posted on 2008-10-02
1
134 Views
Last Modified: 2013-12-17
Hi I have two tables 1) student and 2) student_type

I have 2 two combo's (thats the requirement which exists as of now)

When student_type is selected all the students have to be shown in another combo.
Incase the student_type is not selected and student is selected the student_type has to be highlighted.

I have a single query written for this (I cant use datarelations as all the existing use joins)

Select student_id,Student_type_id,Student_name,student_type_desc from student a,student_type b
where b.student_type_id = a.student_type_Id

Can the code be shown for the requirement

currently i bind the following way

comboStudent.Datasource = ds.tables[0];
combostudent.displaymember = student_name;
combostudent.valuemember = student_id
combostudent.selectedIndex = -1
combostudent.sleectedndexchnaged = += new System.EventHandler(this.combostudent_SelectedIndexChanged);

cboType.Datasource = ds.tables[0];
cboType.displaymember =  student_type_desc;
cboType.valuemember =student_type_id
cboType.selectedIndex = -1
cboTypet.sleectedndexchnaged = += new System.EventHandler(this.cboType_selectedindexchanged);
0
Comment
Question by:dotnet0824
1 Comment
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 22629719
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now