Click here to Skip to main content
15,887,998 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
i have two table in database one is course table and the other one is class.if i select the class in one combo box then according to class automatically other combo box of subject show tha data according to the class.and i am working in ado.net help me
Posted
Updated 10-Feb-16 5:26am
v2
Comments
F-ES Sitecore 10-Feb-16 11:26am    
Win Forms, WebForms, or MVC? Google "cascading dropdown <insert appropriate technology here>"
Sergey Alexandrovich Kryukov 10-Feb-16 11:28am    
ComboBox? Which one? Full type name, please. And what is the problem?
—SA
BillWoodruff 10-Feb-16 12:11pm    
What have you tried ? What is the nature of the data in the 'class table that you wish displayed ?

You can find an example here of how to use Linq to transform a single DataTable into groups:

http://www.codeproject.com/Answers/1076978/How-to-create-daily-attendance-report-in-login-tim

The task of dynamically changing one ComboBoxes value- and display- members in response to a selection in another ComboBox is a common one. The right solution requires analysis of the types of data involved, whether binding can be used, whether the data is so potentially vast that you need to do partial loading, or whether the data is small enough that you can pre-load all the possible sets of data that the second ComboBox will need.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900