I'm attempting to loop through the rows within a datagridview and change the colour of a single cell depending on its stored value.
I have tried the two methods below but neither work and no exceptions are thrown.
1:
row.Cells[8].Style.BackColor = Color.Red;
2:
dgvProperties[row.Index, 8].Style.BackColor = Color.Red;
3 (another attempt since writing this question, also does not work):
dgvProperties.Rows[row.Index].Cells[8].Style.BackColor = Color.Red;
Any help appreciated.
Try this, I guess this is what you are looking for..
Credits: here