T Hoecherl
asked on
Change font color in DataGridView entire row
I have a datagridview in which I change the font color after testing for certain criteria. Here is the code snippet:
If dgvStatus = "Ho" Then
e.CellStyle.ForeColor = Color.Red
End If
This changes the font color in the cell used in the selection criteria, but I want to change the font color in every cell in the row. How can I do this?
T
If dgvStatus = "Ho" Then
e.CellStyle.ForeColor = Color.Red
End If
This changes the font color in the cell used in the selection criteria, but I want to change the font color in every cell in the row. How can I do this?
T
ASKER
The only thing that pops up with intellisense is RowIndex.
If I just type in your suggestion, I get this error:
"'Row' is not a member of 'System.Windows.Form.DataG ridViewCel lFormattin gEventArgs '."
If I just type in your suggestion, I get this error:
"'Row' is not a member of 'System.Windows.Form.DataG
What event did you use?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect. Thank you.
T
T
e.Row.ForeColor = System.Drawing.Color.Red