في حدث Table1DataGridView_CellBeginEdit اكتب التالي
كود :
If Not IsNumeric(Table1DataGridView.CurrentRow.Cells(2)) Then
Table1DataGridView.CurrentRow.Cells(2).Value = ""
MsgBox("هذا الطالب غائب")
Table1DataGridView.CurrentRow.Cells(2).Style.BackColor = Color.Red
End If