If (e.ColumnIndex = 1) Then 'This will specify which column Dim cellData = DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value If cellData Is NotWholeNum Then 'I don't know how to prevent non-whole numbers MessageBox.Show("Only Whole Numbers Allowed") DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = "DefaultValue" 'This will supply a default value back to the datagridviewcell Exit Sub End If
If CType(cellData, int) <> cellData Then
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)