Hello Group,
I have a problem with my bindings.
I use the following code to define my Postition changed for my ComboBox1:
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal
e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If Me.BindingContext(objdsAccess, "Users").Position <> -1 And Not
mlLoading Then
objdsAccess.Users.Rows(Me.BindingContext(objdsAccess,
"Users").Position).Item("AccessLevelID") = Me.ComboBox1.SelectedValue
End If
End Sub
Private Sub objdsAccess_PositionChanged()
If Me.BindingContext(objdsAccess, "Users").Position <> -1 Then
Me.ComboBox1.SelectedValue =
objdsAccess.Users.Rows(Me.BindingContext(objdsAccess,
"Users").Position).Item("AccessLevelID")
End If
Me.lblNavLocation.Text = (((Me.BindingContext(objdsAccess,
"Users").Position + 1).ToString + " of ") + Me.BindingContext(objdsAccess,
"Users").Count.ToString)
End Sub
The above works fine if I use it on my Nav buttons to Navigate for example:
Private Sub btnNavNext_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNavNext.Click
Me.BindingContext(objdsAccess, "Users").Position =
(Me.BindingContext(objdsAccess, "Users").Position + 1)
Me.objdsAccess_PositionChanged()
End Sub
I`ve now added a Datagrid but when I move through the datagrid, it updates
all my Textboxs but my ComboBox1 never changes, it just sticks on the first
Item in the list
How do I get my ComboBox to change, when moving through My Datagrid?
Could somebody please point me in the right direction?
Many Thanks
MCN