Try updating the binding value on the SelectedIndexChanged event:
comboBox1.SelectedIndexChanged += (cb, cbArgs) => {
comboBox1.DataBindings[0].WriteValue();
};
Domanda
I have a combo box and a label that are linked together with data binding.
When I change the selection in the combo box, the label doesn't show any change until I focus away from the combo box.
I would like to instead have the label show the change as soon as the user clicks on a different selection in the combo box.
Is there a solution without having to manually write a callback to the combobox SelectedValueChanged event?
I am trying to see what I can do with data binding in .NET 3.5 land.
Soluzione
Try updating the binding value on the SelectedIndexChanged event:
comboBox1.SelectedIndexChanged += (cb, cbArgs) => {
comboBox1.DataBindings[0].WriteValue();
};