Click here to Skip to main content
13,046,464 members (72,637 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I would like to make like 4 comboboxes where each list within the combobox derives from the previous one. I thought this would be as easy as setting each box to a variable and then using that variable in the query for the combobox after it. I have attempted to use a variable in the query editor in the fillby, and also attempted to use code like this:
            using (SqlConnection cs = new SqlConnection(
@"Data Source=100-olkj-900-ptalog=Report;Persist Security Info=True;User ID=reports;Password=password
                using DataAdapter da = new SqlDataAdapter(query
                    // 3
                    DataTable t = new DataTable();
                    // 4
                    // Render data onto the screen
                    comboBox1.DataSource = t; // <-- From your designer
                    comboBox1.DisplayMember = "station.stationipaddress";
                    comboBox1.ValueMember = "station.stationipaddress";

I am not really sure, what to try...
Any ideas anyone >?
Posted 16-Jan-13 17:05pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Hello Prevatt, This link will help u surely. For this purpose we can use cascading drop downs, these are also so-called dependancy drop downs while loading the consequent drop down it wont effect the entire page i.e, updates only the partial page or specific drop down. Try this code[^]

Happy Coding....

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100