I have a combobox and I need the first row to be set as default.
This is my code
cbBrandForModel.DisplayMember = "BrandName";
cbBrandForModel.ValueMember = "BrandID";
cbBrandForModel.DataSource = dataTable;
I need to add this:
cbBrandForModel.DisplayMember = "Select Brand";
cbBrandForModel.ValueMember = "0";
Can anyone tell me how to do it?
EDIT: I managed to add a new row in my DataTable.
var dataRow = dataTable.NewRow();
dataRow["BrandID"] = "0";
dataRow["BrandName"] = "--Select Brand--";
dataTable.Rows.Add(dataRow);
Now I need to set this row as the first row in the combobox.