I have a pretty straightforward combobox on a form.
During initialization, I set the databindings on the
combobox (DropDownList):
cboType.ValueMember = "ID"
cboType.DisplayMember = "Description"
cboType.DataSource = dsRel.Tables(TBL_RLT)
cboType.DataBindings.Add(New Binding("SelectedValue",
dsRel, TBL_REL & ".Type"))
Everyting looks as expected, even the proper DisplayValue
is shown. However there are two thing bugging me:
1) The cboType.SelectedValueChanged event is NOT fired
after the DataBindings.Add statement.
2) The cboType.SelectedValue is NOT CORRECT !!
Only after I click on the combobox manually, the proper
event is fired and the cboType.Selected value is correct.
Now, am I doing something wrong or is this a
(undiscovered) bug?
.