Results 1 to 2 of 2

Thread: Why does the label " lblNavLocation " for the record count does not update when I cli

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    376

    Why does the label " lblNavLocation " for the record count does not update when I cli

    Why does the label " lblNavLocation " for the record count does not update when I click a Row directly on the datagrid?

    Code:
    Private Sub objdsMachines_PositionChanged()
            Me.lblNavMachinesLocation.Text = (((Me.BindingContext(dataSetMachines, "Machines").Position + 1).ToString + " of  ") _
                        + Me.BindingContext(dataSetMachines, "Machines").Count.ToString)
        End Sub
    But when I click a Navigation Bar buttons like Next or Previous then it does.
    Code:
    Private Sub btnNextRecord_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNextRecord.Click
            Me.BindingContext(dataSetReadings, "Readings").Position = (Me.BindingContext(dataSetReadings, "Readings").Position + 1)
            Me.objdsReadings_PositionChanged()
        End Sub

  2. #2
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    Capture this event instead

    PHP Code:
    Private Sub DataGrid1_CurrentCellChanged(ByVal sender As ObjectByVal e As System.EventArgsHandles DataGrid1.CurrentCellChanged
    End Sub 

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