I am using CheckedListBox
control in windows forms. I need to bind that CheckedListBox
Dynamically using entity model.
My Query:
private void BindTax()
{
try
{
eTax Tax = new eTax();
cTax cTax= new cTax();
List<eTax> ObjTax = cTax.GetTax(eGEntities);
Tax.CategoryId = Convert.ToInt32("-1");
Tax.CategoryName = "--Select--";
ObjTax.Insert(0, Tax);
foreach (eTax item in ObjTax)
{
lstchkTax.Items.Add(item.TaxName);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
I am getting Dispayname
but I'm not getting the selectedValue
. I am not finding the data source property for this control. Please tell me How can I do this?
Thanking you in advance.