各位好,在使用GRIDVIEW控件时程序中插入行列后显示的表格总是有如图红圈所示的已选择块,有没办法消除. 

解决方案 »

  1.   

    this.dataGridView1.ClearSelection();
                this.dataGridView1.TabStop = false;
      

  2.   

                    GridSampleData[m].ReadOnly = true;
                    GridSampleData[m].TabStop = false;
    我也设置了,但是窗体上的六个DATAGRIDVIEW还是每个都有焦点
    对就是失去焦点想..
      

  3.   

    this.dataGridView1.ClearSelection();
    这个有效!谢谢了,送分了
      

  4.   

    this.dataGridView1.ClearSelection();