Why does the label " lblNavLocation " for the record count does not update when I click a Row directly on the datagrid?
But when I click a Navigation Bar buttons like Next or Previous then it does.Code:Private Sub objdsMachines_PositionChanged() Me.lblNavMachinesLocation.Text = (((Me.BindingContext(dataSetMachines, "Machines").Position + 1).ToString + " of ") _ + Me.BindingContext(dataSetMachines, "Machines").Count.ToString) End Sub
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




Reply With Quote