//删除测点 private void DeletePoint_Click(object sender, EventArgs e) { if (gridView1.RowCount > 0) { lastId = gridView1.GetRowCellValue(gridView1.RowCount - 1, gridView1.Columns[0]).ToString(); DialogResult dr = MessageBoxEX.Show("提示", "确认删除最后一条数据吗?"); if (dr == DialogResult.OK) { DeleteButton.Invoke(sender, EventArgs.Empty); } return; } ShowToast("提示", "暂无数据可删除!", 2); }