Results 1 to 2 of 2

Thread: working out if at the end of the dataset

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    working out if at the end of the dataset

    Hi all, im navigation through records using

    Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
    Try
    Me.BindingContext(DataSet11, "CustomerDetails").Position += 1

    Catch er As Exception
    MsgBox(er.ToString)
    End Try
    End Sub

    what i wana know is how can i find out if the record is the last one of the record set. because what i wana really do is this

    screen shows record - at bottom next button, if the current record is the last one then when
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You might try checking it against the count. Something like this:
    VB Code:
    1. If DirectCast(Me.BindingContext, BindingManagerBase).Position = DirectCast(Me.BindingContext, BindingManagerBase).Count - 1 Then
    2.               'at the end
    3.         End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width