新增一行 ()
private void btnAdd_Click(object sender, EventArgs e)
{
DataRow dr = m_rz_dt.NewRow();
m_rz_dt.Rows.Add(dr);
//新增之后界面展示为当前展示的最后一行
gvRegionZone.MoveLast();
}
删除一行
private void btnDel_Click(object sender, EventArgs e)
{
if (gvRegionZone.FocusedRowHandle < 0)
{
return;
}
m_rz_dt.Rows.RemoveAt(gvRegionZone.FocusedRowHandle);
}
网友评论