populate 2nd combobox based on the 1st combobox
i want to update my second combo box based on the choice on the first
combobox. what is the simplest way to do this? i had my first combobox works.
ok.. so far, this is my code for the 1st combobox
using (SqlConnection conn = new SqlConnection(Properties.Settings.Default.dbConnectionString))
{
SqlDataAdapter da = new SqlDataAdapter("SELECT [CategoryName] FROM Categories",conn);
DataSet ds = new DataSet();
daCat.Fill(ds,"Categories");
comboBox1.DataSource = ds.Tables["Categories"];
comboBox1.DisplayMember = "CategoryName";
}
i don't know how the code for second combobox will start. but the sql will say something like this..
select productname
from products
where categoryID=combobox1.text
wafflePosted Apr 8, 2007, 12:34 AM
savan gandhiPosted Apr 6, 2007, 12:13 PM
wafflePosted Apr 4, 2007, 11:34 AM
savan gandhiPosted Apr 4, 2007, 10:21 AM
wafflePosted Apr 4, 2007, 3:40 AM
wafflePosted Apr 3, 2007, 11:12 AM
savan gandhiPosted Apr 3, 2007, 10:59 AM
wafflePosted Apr 3, 2007, 10:38 AM
savan gandhiPosted Apr 3, 2007, 8:54 AM