If a user leaves a record in a DataGridView and they haven't entered a required field I keep getting system.Data.NoNullAllowedE
I'm trying to catch it with the code below but it doesn't work. Is there an easy way to do this?
Private Sub myDataGridView_RowValidating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellCancelEventArgs) Handles myDataGridView.RowValidating
Catch ex As NoNullAllowedException
MessageBox.Show("You left a record without filling in all of the required fields " & ex.Message)