I have a ComboBox associated with a data source, but it will not update the bindings until the control loses focus. How can I get bindings to update when changing selected items? In the screenshot below, I want the label to be updated immediately to display the new selection.

Code:
public enum MyEnum { First, Second } public class MyData { public String Name { get; set; } public MyEnum MyEnum { get; set; } }
Form Example:
public SampleForm() { InitializeComponent (); MyData data = new MyData () { Name = "Single Item" }; this.bindingSource1.DataSource = data; this.comboBox1.DataSource = Enum.GetValues (typeof (MyEnum)); this.label2.DataBindings.Add ("Text", this.bindingSource1, "MyEnum", true, DataSourceUpdateMode.OnPropertyChanged); this.comboBox1.DataBindings.Add (new System.Windows.Forms.Binding ("SelectedItem", this.bindingSource1, "MyEnum", true)); this.comboBox1.DataBindings.Add (new System.Windows.Forms.Binding ("SelectedValue", this.bindingSource1, "MyEnum", true)); }
source share