I have a dataGridView that has it's property SelectionMode = FullRowSelect
Even in this mode the current cell property gets set.
When a row is selected the row is highlighted with the row indicator (which is by default blue). I want to change the color of the current cell as a DIFFERENT color than the highlighter color.
I tried to add the code:
dgvTemp.CurrentCellChanged += new EventHandler(dgvTemp_CurrentCellChanged);void dgvTemp_CurrentCellChanged(object sender, EventArgs e) { DataGridView dgvTemp = (DataGridView)sender;if (dgvTemp.CurrentCell != null) { dgvTemp.CurrentCell.Style.BackColor = Color.BlueViolet; dgvTemp.CurrentCell.Style.ForeColor = Color.BlueViolet; } }
But it doesn't seem to work.