int[] rows = gridView1.GetSelectedRows(); if (rows.Length > 0) { if (DialogHelper.YesNo(this, "确认删除该记录?", "删除提示") != System.Windows.Forms.DialogResult.Yes) return; DataRowView drv = (DataRowView)gridView1.GetRow(rows[0]); //_layerUpdater.b.Rows.Remove(drv.Row); drv.Row.Delete(); }