Hi all I have problem with following:
foreach (DataRow dr in data.Tables[0].Rows)
{
string value = dr["name"].ToString();
combobox.Items.Add(value);
}
My values are getting to value variable but not getting into combobox list.
Anything I can do?
You need to add objects with properties of value and displayMember to the ComboBox.
You can create a Struct with those properties and then add instances of the struct to the combobox.
Then add NewItem to the combobox: