-1
This is my code:
Private Sub ListaVeiculos_CellFormatting(sender As Object, e As DataGridViewCellFormattingEventArgs) Handles ListaVeiculos.CellFormatting
For i As Integer = 0 To ListaVeiculos.Rows.Count - 1
If ListaVeiculos.Rows(i).Cells(("DateFimVig")).Value.ToString = "19/02/2020" Then
ListaVeiculos.Rows(i).DefaultCellStyle.ForeColor = Color.Blue
End If
Next
End Sub
It’s not working. It’s not coloring anything.
ForeColor
sets the text color. You have tried usingBackColor
?– CypherPotato
Already. It doesn’t work.
– DP WS Receptivo
Have you checked if that parole is being
True
to change the value?– CypherPotato
Coincidentally this problem is only with the date column. When I use other columns with common names it works.
– DP WS Receptivo