14-04-19, 04:43 AM
PHP كود :
Private Sub GV_CellFormatting(ByVal sender As Object, ByVal e As DataGridViewCellFormattingEventArgs)
For Each drview As DataGridViewRow In GV.Rows
Dim ColNo As Integer = 2
While (ColNo <= 2)
If Not (drview.Cells(2).Value Is Nothing) Then
If (Convert.ToInt32(drview.Cells(2).Value) > 17) Then
drview.Cells(2).Style.BackColor = Color.Red
ElseIf (Convert.ToInt32(drview.Cells(2).Value) <= 17) Then
drview.Cells(2).Style.BackColor = Color.White
End If
End If
ColNo += 1
End While
Next
End Sub
