winform下:
       DataGridView的第一行是默认选中的,怎么让DataGridView的所有行都不选中?百度上没找到解决方法。

解决方案 »

  1.   

    增加 SelectionChanged事件
     void dataGridView1_SelectionChanged(object sender, EventArgs e)
            {
                dataGridView1.ClearSelection();
                dataGridView1.CurrentCell = null;
            }
    如果绑定后也加上 
      dataGridView1.ClearSelection();
                dataGridView1.CurrentCell = null;