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();
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…