G
Guest
I've been trying to move to the last row of a table. The
connection, dataadapter, dataset and so on have all been
created in code. The examples of moving position in all
the books I've read are for navigation controls in forms,
and include bindingcontext. I need to find a value for a
column in the last row of a table where there is no form
or controls in which these values are displayed.
For example:
Private Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button1.Click
'Move to first position
Me.BindingContext(das1, "Shippers").Position _
= 0
End Sub
Private Sub Button2_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button2.Click
'Move to previous position
Me.BindingContext(das1, "Shippers").Position _
-= 1
End Sub
Private Sub Button3_Click(ByVal sender As
System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click
'Move to next position
Me.BindingContext(das1, "Shippers").Position _
+= 1
End Sub
Private Sub Button4_Click(ByVal sender As
System.Object, _
ByVal e As System.EventArgs) Handles Button4.Click
'Move to last position
Me.BindingContext(das1, "Shippers").Position = _
Me.BindingContext(das1, "Shippers").Count - 1
End Sub
How do I get to a position without a bindingcontext?
thanks,
Dennist
connection, dataadapter, dataset and so on have all been
created in code. The examples of moving position in all
the books I've read are for navigation controls in forms,
and include bindingcontext. I need to find a value for a
column in the last row of a table where there is no form
or controls in which these values are displayed.
For example:
Private Sub Button1_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button1.Click
'Move to first position
Me.BindingContext(das1, "Shippers").Position _
= 0
End Sub
Private Sub Button2_Click(ByVal sender As Object, _
ByVal e As EventArgs) Handles Button2.Click
'Move to previous position
Me.BindingContext(das1, "Shippers").Position _
-= 1
End Sub
Private Sub Button3_Click(ByVal sender As
System.Object, _
ByVal e As System.EventArgs) Handles Button3.Click
'Move to next position
Me.BindingContext(das1, "Shippers").Position _
+= 1
End Sub
Private Sub Button4_Click(ByVal sender As
System.Object, _
ByVal e As System.EventArgs) Handles Button4.Click
'Move to last position
Me.BindingContext(das1, "Shippers").Position = _
Me.BindingContext(das1, "Shippers").Count - 1
End Sub
How do I get to a position without a bindingcontext?
thanks,
Dennist