Hello
I have combined two combo boxes but I need to combine them like this flow
then select item type -- AA, BB, CC
after that in third combo it should list in description of items regarding
AA - abdbdbfbd
BB - dhjhdfdhf
private void cmbItemType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbItemType.SelectedValue != null && cmbWharehouse.SelectedValue != null)
{
loadGrid(cmbWharehouse.SelectedValue.ToString(), cmbItemType.SelectedValue.ToString());
}
}
load the combo
private void loadItemTypeCombo()
{
List<Entity.beanItem> _list = new List<Entity.beanItem>();
_list = _brItemType.getItem();
this.cmbItem.ValueMember = "TYPE";
this.cmbItem.DisplayMember = "DESCRIPTION";
this.cmbItem.DataSource = _list;
}
public class brItem
{
Dataaccess.DAItem _da = new Dataaccess.DAItem();
public List<entity.beanitem> getItem()
{
List<entity.beanitem> _list = new List<entity.beanitem>();
try
{
DataSet ds = _da.getItem();
if (ds != null)
{
Entity.beanItem _bnnew = new Entity.beanItem();
_bnnew.ITEMCODE = "ALL";
_bnnew.TYPE = "ALL";
_bnnew.DESCRIPTION = "ALL";
_list.Add(_bnnew);
foreach (DataRow dr in ds.Tables[0].Rows)
{
Entity.beanItem _bn = new Entity.beanItem();
_bn.ITEMCODE = dr["ITEMCODE"].ToString();
_bn.DESCRIPTION = dr["DESCRIPTION"].ToString();
_bn.TYPE = dr["TYPE"].ToString();
_list.Add(_bn);
}
}
}
catch (Exception)
{
throw;
}
return _list;
}