Solved

winform combo relationship

Posted on 2008-10-02
1
139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 70

Accepted Solution

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

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

617 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