V
VictorT
Hi All,
I am trying to create a simple Windows form that lists a users' data
one user at a time with the usual "Next" & "Previous" buttons.
Upon loading the form, I am able to populate all textboxes however
when clicking either of the buttons, nothing happens - the data from
the next/previous rows does not re-populate the textboxes. This is an
extremely simple situation yet I cannot figure out what is going
wrong.
Can anyone help? I've attached what little code I have to offer...
Private Sub EmployeesList_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
SqlDataAdapter1.Fill(DataSet11)
SqlDataAdapter1.Fill(ds, "Employees")
End Sub
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNext.Click
Me.BindingContext(ds, "Employees").Position += 1
End Sub
Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnPrevious.Click
Me.BindingContext(ds, "Employees").Position -= 1
End Sub
Thanks,
Vic
I am trying to create a simple Windows form that lists a users' data
one user at a time with the usual "Next" & "Previous" buttons.
Upon loading the form, I am able to populate all textboxes however
when clicking either of the buttons, nothing happens - the data from
the next/previous rows does not re-populate the textboxes. This is an
extremely simple situation yet I cannot figure out what is going
wrong.
Can anyone help? I've attached what little code I have to offer...
Private Sub EmployeesList_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles MyBase.Load
DataSet11.Clear()
SqlDataAdapter1.Fill(DataSet11)
SqlDataAdapter1.Fill(ds, "Employees")
End Sub
Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnNext.Click
Me.BindingContext(ds, "Employees").Position += 1
End Sub
Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnPrevious.Click
Me.BindingContext(ds, "Employees").Position -= 1
End Sub
Thanks,
Vic