hye !
what I understand from your question is that you have comboA and comboB and when you select the comboA then records of comboB will filter ? am i right ? .
Try to do something like this .
//Let suppose we have two comboboxes , 1- cmbSelector 2-cmbFilter
sqlconnection con = new sqlconnection("your connection string");
con.Open();
sqldataadapter da = new sqldataadapter("select TypeId,TypeName from tbl",con);
Datatable dt = new Datatable();
da.fill(dt);
cmbSelector.datasource = dt;
cmbSelector.DisplayMember = "TypeName";
cmbSelector.ValueMember = "TypeId";
con.Close();
//now here is the method which will populate the cmbFilter
private void GetFilter(int TypeId)
{
sqlconnection con = new sqlconnection("your connection string");
con.Open();
sqldataadapter da = new sqldataadapter("select ProductId,ProductName from tbl2 where TypeId=" + TypeId,con);
Datatable dt = new Datatable();
da.fill(dt);
cmbFilter.datasource = dt;
cmbFilter.DisplayMember = "ProductName";
cmbFilter.ValueMember = "ProductId";
con.Close();
}
// now call above method on the selected index change event of cmbSelector.
//Like this
GetFilter(convert.toint16(cmbSelector.SelectedValue));
hope this will help you