Hello
I have this code in a button to update a new record in a dbgridview but raises exeption, if I click a cell of previous record then it accepts the new record (stops edit mode)
Code:
Code:
      Private Sub BindingNavigator1_RefreshItems(sender As Object, e As EventArgs) Handles BindingNavigator1.RefreshItems
        ' Me.Table1BindingSource.EndEdit()
        Me.BindingContext(DataSet11, "Table_1").EndCurrentEdit()
        If DataSet11.HasChanges Then
            Try
                SqlDataAdapter1.Update(DataSet11, "Table_1")
                DataSet11.AcceptChanges()
            Catch eUpdate As System.Exception

                'Throw eUpdate
                MsgBox(eUpdate.Message.ToString)
            End Try
        End If
    End Sub