Dim columnName As String = dgvResults.Columns(e.ColumnIndex).Name Dim cellVal As String = e.FormattedValue.ToString() If e.ColumnIndex = 0 AndAlso cellVal.Length <> 5 Then e.Cancel = True MessageBox.Show(columnName & " must be 5 Digits Long!") End If
If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)