CellMouseDown事件中
if   (e.Button   !=   MouseButtons.Right   ||   e.RowIndex   <   0)  
            return;  
  dataGridView1.Rows[e.RowIndex].Selected   =   true;

解决方案 »

  1.   

    如果是绑定的话直接操作数据源就可以了
    否则可以使用dataGridView.Rows.Insert
      

  2.   

    在单击事件中添加:
    newTable.Rows.Add(newTable.NewRow());//newTable为DataGridView中添加的自定义表
      

  3.   

    数据库里先插入这行,在用GRIDVIEW刷新当前页
      

  4.   

    楼主  我也想要
    [email protected]
      

  5.   

    DataRow dataRow = this.dataTable.NewRow();
    this.dataTable.Rows.InsertAt(dataRow, index);
      

  6.   

    首先把dataTable綁定datagridview
    DataRow row = this.dataTable.NewRow();
    this.dataTable.Rows.InsertAt(row, index+1);