I can add a series of items to a comboBox as follows:-
foreach (DataRow row in Variables.ClientsTable.Rows) { string temp1 = row["CompanyName"].ToString(); string temp2 = row["CompanyID"].ToString(); comboBoxProjects20.Items.Add(temp1); comboBoxProjects20a.Items.Add(temp2); }
However the comboBox then drops down a blank list, which looks to be of the right length. I assume I need to set the DisplayMember and other properties, but how do I select the just added item to do this?