Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27333

VS 2012 BindingSource navigation not functional?

$
0
0
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:

Code:

taTeacher.Fill(tTeacher)
        bsTeacher.DataSource = tTeacher
        dgvTeacherList.DataSource = bsTeacher.DataSource
        dgvTeacherList.ReadOnly = True

The form here will load with data.

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

May anyone explain to me what is wrong or what am I missing please?

Viewing all articles
Browse latest Browse all 27333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>