Hi ,
Am using this following code my cell validating,This code if user leave empty row or if row got focus at empty cell it will prompt messagebox until user enter value.

but i need if user want to continue with empty value it allow to add new row or go to other tab.

Please help me...



Private Sub dgvHeaderRemarks_CellValidating(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellValidatingEve ntArgs) Handles dgvHeaderRemarks.CellValidating

If dgvHeaderRemarks.Columns(e.ColumnIndex).Name = "Remarks" Then
If e.FormattedValue IsNot Nothing AndAlso _
String.IsNullOrEmpty(e.FormattedValue.ToString().T rim) Then

'dgvSupportingDocument.CurrentRow.Cells(1).Selecte d = True

MessageBox.Show("HeaderRemarks Field cannot be empty.Please use delete row.", "HeaderRemarks", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)

e.Cancel = True
End If
End If
End Sub