I've bound it using
cmbPeriod.DataBindings.Add("SelectedItem", Presenter, "SelectedDate", true, DataSourceUpdateMode.OnPropertyChanged);
But it only fires to the bound model when I tab out of the control, I'd like it to fire the moment the users makes a new selection.
EDIT: Ok so I tried binding using SelectedValue
instead and leaving the ValueMember
as null
. This had the effect of updating the source as soon as the combobox changes with the correct object, however now the combobox ignores updates from the source!!
I see it requesting the binding at runtime and my source property returns the correct object, which is the the same type the combobox will update the source with on change. Ugh! So close:(
cmbPeriod.DataBindings.Add("SelectedValue", Presenter, "SelectedDate", true, DataSourceUpdateMode.OnPropertyChanged);
binding to SelectedValue works on change
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With