private void dgrdXOrderList_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
int rowindex = e.RowIndex;
int colIndex = e.ColumnIndex;
if (dgrdXOrderList.Rows[rowindex].Cells[colIndex].Value == null)
{

MessageBox.Show("不能为空");

}
else
{
emp.UpdateModifier();
DBFactory.SubmitChanges();
}
}
如果修改后的单元格的值错误 就返回 原来的值