Private Sub gcMultiRow1_DataError(ByVal sender As Object, ByVal e As DataErrorEventArgs) Handles GcMultiRow1.DataError
' The first id cell only can input number, if user input some invalid value, DataError event will be fired.
' You should handle this event to handle some error cases.
If (e.Context And DataErrorContexts.Commit) <> 0 Then
' When committing value occurs error, show a massage box to notify user, and roll back value.
MessageBox.Show(e.Exception.Message)
EditingActions.CancelEdit.Execute(Me.gcMultiRow1)
' Other handle.
Else
End If
End Sub |