How do you change color? You might want to look at the CellFormatting event to see if you can explicitly draw a cell when it is visible to the user. Thus, every time he redraws a cell, you can guarantee that the color will be correct. (Assuming you need different colors for the rows, otherwise just set the cell style and nullify the control.
UPDATE:
It is important that you refer to the cellstyle through args of events, otherwise you will do recursion to work out the style of the cell you are trying to access.
private void dataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
e.CellStyle.BackColor = Color.PaleGreen
}
source
share