I have been trying to figure this problem out for a while now. I'm new to programming and i keep getting stuck on this one issue and i cannot or do not know what i am looking for to figure it out.
I have a listbox that is bound to a dataset with multiple tables in the dataset. All objects on the form are bound to differant fields in the dataset except for one, a combobox.
Basically when i select an item in the listbox i want the selectedindex changed event to set the combobox selected value to a column in the listbox selected index but the listbox indexchanged event is still running and it gives an error. It will popup a messagebox with the correct value but the event is not finished firing so it doesn't know what value to assign to the combobox.
the code is
Private Sub lstUserName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstUserName.SelectedIndexChanged
Dim selectrow As DataRow
If _loaded = 1 Then
selectrow = Ds.User.Select("UserID = " & CInt(lstUserName.SelectedValue))(0)
cbAccessLevel.SelectedValue = selectrow.Item("Column") '--This is where it blows up
Catch ex As Exception
MsgBox(lstUser.SelectedIndex.ToString + " and " + lstUserName.SelectedIndex.ToString)
Can someone point me to a good referance?? i think i am just not looking for the right stuff.