I've posted my code below. I have 2 combo boxes (cbo1 and cbo2)
When the user selects a value from cbo1, and changes focus, I want to set the value of cbo2 based on the selected value of cbo1.
The fetchList call works fine, it returns the selected list.
Here is the problem. When I select an item from cbo1, and then cause it to lose focus, the below function is called, BUT cbo2 is blank. If i select the same item again (from cbo1) and lose focus again, cbo2 is then filled properly.
Can anyone point out what I'm doing wrong?
Private Sub cbo1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbo1.LostFocus
If cbo1.SelectedValue Is Nothing Then Exit Sub
cbo2.DisplayMember = "DisplayString"
cbo2.ValueMember = "Value"
cbo2.DataSource = myClass.fetchList(cbo1.SelectedValue)