Hi
Duraimurugan ,
Actually your code sample helped a lot thanks. I have found another issue but i m unable to understand why and how it occurs.
If i use this way:
foreach (var value in this.project.getRoadTypes())
{
sfComboBox1.CheckedItems.Add(value);
}
}
The items in dropdownlist on combobox component still are not checked. getRoadTypes method returns the List<RoadTypes>. RoadTypes is EF data model which created by EF as poco class.
On the other hand if i use this way that you create on sample project it works:
List<RoadTypes> roadTypesList = new List<RoadTypes>();
private List<RoadTypes> GetRoadTypes()
{
foreach (var item in this.project.GetRoadTypes())
{
roadTypesList.Add(new RoadTypes() { ID = item.ID, Name= item.RoadType});
}
}
GetRoadTypes()
sfComboBox1.DataSource= roadTypesList;
sfComboBox1.DisplayMember = "Name";
sfComboBox1.ValueMember = "ID";
foreach (var value in roadTypesList)
{
sfComboBox1.CheckedItems.Add(value);
}