Solved

winform combo relationship

Posted on 2008-10-02
1
137 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 70

Accepted Solution

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

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 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