I want to go through and change the backcolor for rows that are equal. I'm doing just a loop comparing the rows (not worried about performance), and when I find duplicates, I've tried to execute all 3 versions of this with no results:
What other properties do I need to change in order for my colors to be reflected?
Code:
//dgv[cn, oCounter].Style.BackColor = System.Drawing.Color.Red;
//dgv[cn, iCounter].Style.BackColor = System.Drawing.Color.Red;
//((DataGridViewCell)dgv[cn, oCounter]).Style.BackColor = System.Drawing.Color.Red;
//((DataGridViewCell)dgv[cn, iCounter]).Style.BackColor = System.Drawing.Color.Red;
((DataGridViewRow)dgv.Rows[oCounter]).DefaultCellStyle.BackColor = System.Drawing.Color.Red;
((DataGridViewRow)dgv.Rows[iCounter]).DefaultCellStyle.BackColor = System.Drawing.Color.Red;
What other properties do I need to change in order for my colors to be reflected?