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