这样呢?
Row.BeginEdit();
Row.Delete();
Row.EndEdit();
Row.AcceptChanges();

解决方案 »

  1.   

    用DataTable1.Rows[i].Remove();
    方法试试看
      

  2.   

    以下示例创建一个简单的 DataTable,该表有两列、十行。在用 Delete 方法删除几个 DataRow 项之后,通过调用 RejectChanges 取消删除其中的一行。
    private void DemonstrateDeleteRow(){
       // Create a simple DataTable with two columns and ten rows.
       DataTable myTable = new DataTable("myTable");
       DataColumn c1 = new DataColumn("id",Type.GetType("System.Int32"));
       c1.AutoIncrement=true;
       DataColumn c2 = new DataColumn("item", Type.GetType("System.String"));
       myTable.Columns.Add(c1);
       myTable.Columns.Add(c2);
       // Add ten rows.
       DataRow newRow;
            
       for(int i = 0; i <10; i++){
          newRow = myTable.NewRow();
          newRow["item"] = "Item " + i;
          myTable.Rows.Add(newRow);
       }
       myTable.AcceptChanges();
       // Create a DataView with the table.
       DataRowCollection rc = myTable.Rows;
       rc[0].Delete();
       rc[2].Delete();
       rc[3].Delete();
       rc[5].Delete();
       Console.WriteLine(rc[3].RowState.ToString());
       // Reject changes on one deletion.
       rc[3].RejectChanges();
       // Change the value of the column so it stands out.
       rc[3]["item"] = "Deleted, Undeleted, Edited";
       // Accept changes on others.
       myTable.AcceptChanges();
       // Print the remaining row values.
       foreach(DataRow r in myTable.Rows){
          Console.WriteLine(r[0] + "\t" + r[1]);
       }
    }