Disable Cell Highlighting in a datagridview

The ForeColor/BackColor kludge wasn’t working for me, because I had cells of different colors. So for anyone in the same spot, I found a solution more akin to actually disabling the ability.

Set the SelectionChanged event to call a method that runs ClearSelection

private void datagridview_SelectionChanged(object sender, EventArgs e)
{
    this.datagridview.ClearSelection();
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)