Hi everyone.
I'm having an issue with bindingsources this time, the binding source is binded to a datatable and I have a datagridview binded to the bindingsource, thus I have the datagridview showing off data from the datatable and I should be able to navigate the datagridview with the bindingsouce through it's simple methods like MoveNext() and so on, but the problem is that I'm not being able to navigate the datagridview.
I have the following code on the loading of the form:
The form here will load with data.
On the navigation buttons I have the following codes:
May anyone explain to me what is wrong or what am I missing please?
I'm having an issue with bindingsources this time, the binding source is binded to a datatable and I have a datagridview binded to the bindingsource, thus I have the datagridview showing off data from the datatable and I should be able to navigate the datagridview with the bindingsouce through it's simple methods like MoveNext() and so on, but the problem is that I'm not being able to navigate the datagridview.
I have the following code on the loading of the form:
Code:
taTeacher.Fill(tTeacher)
bsTeacher.DataSource = tTeacher
dgvTeacherList.DataSource = bsTeacher.DataSource
dgvTeacherList.ReadOnly = True
On the navigation buttons I have the following codes:
Code:
Private Sub btnFirst1_Click(sender As Object, e As EventArgs) Handles btnFirst1.Click
bsTeacher.MoveFirst()
End Sub
Private Sub btnPrevious1_Click(sender As Object, e As EventArgs) Handles btnPrevious1.Click
bsTeacher.MovePrevious()
End Sub
Private Sub btnNext1_Click(sender As Object, e As EventArgs) Handles btnNext1.Click
bsTeacher.MoveNext()
End Sub
Private Sub btnLast1_Click(sender As Object, e As EventArgs) Handles btnLast1.Click
bsTeacher.MoveLast()
End Sub