janlindso
janlindso

Reputation: 1239

Using properties of BindingNavigator

I've made a form where I can scroll through some rows in a SQL with the BindingNavigator-control.

Now I want to use the properties of this control in my code. Is it somehow possible to check if it has reach the last page/row? I want a button to be displayed then.

Upvotes: 1

Views: 869

Answers (1)

LarsTech
LarsTech

Reputation: 81620

You can achieve this through listening for the PositionChanged event of the BindingSource that the BindingNavigator uses:

Private Sub myBinding_PositionChanged(ByVal sender As Object, ByVal e As EventArgs) Handles myBinding.PositionChanged
  If myBinding.Position = myBinding.Count - 1 Then
    MessageBox.Show("Last One!")
  End If
End Sub

Upvotes: 1

Related Questions