14-12-18, 02:31 PM
كود :
Private Sub DataGridView1_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles DataGridView1.CellFormatting
If DataGridView1.Columns(e.ColumnIndex).Name = "Exp" AndAlso IsDBNull(e.Value) Then
DataGridView1.Rows(e.RowIndex).DefaultCellStyle.BackColor = Color.Red
End If
End Sub