Hi NeilHamiltonJr-4091,
When using the DropDownList style, you can only set "Text" to the value that actually appears in the list.
Here is my test code example:
private void Form1_Load(object sender, EventArgs e)
{
MyData data = new MyData() { Name = "Red" };
this.bindingSource1.DataSource = data;
comboBox1.DataBindings.Add(new Binding("SelectedValue", this.bindingSource1, "MyEnum", true, DataSourceUpdateMode.OnPropertyChanged));
comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
comboBox1.FormattingEnabled = true;
comboBox1.Items.AddRange(new object[] { "", "Green", "Red", "Yellow", "Blue", "Gold", "Purple" });
comboBox1.Text = data.Name;
comboBox1.Location = new System.Drawing.Point(98, 87);
comboBox1.Name = "shiftColourComboBox";
comboBox1.Size = new System.Drawing.Size(121, 21);
}
The result:
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.