回复 12楼Alice的帖子
您好,我在CommitedEdit事件里加了处理后结果不变。然后为了排除其它干扰,我在几个事件里都加上一句话,只做清除Error的操作,可还是没有任何效果,行头的错误提示仍有15条,重复了8条,我觉得很奇怪,可否帮忙看下为什么?我的代码如下:
private void BoardInfoGrid_OnCommittedEdit(object sender, DataGridCellEventArgs e)
{
e.Cell.Row.Errors.Clear();
}
private void BoardInfoGrid_OnCommittedRowEdit(object sender, DataGridRowEventArgs e)
{
e.Row.Errors.Clear();
}
private void BoardInfoGrid_OnCommittingEdit(object sender, DataGridEndingEditEventArgs e)
{
e.Row.Errors.Clear();
}
private void BoardInfoGrid_OnCommittingRowEdit(object sender, DataGridEditingRowEventArgs e)
{
e.Row.Errors.Clear();
}
private void BoardInfoGrid_OnCommittingNewRow(object sender, DataGridEndingNewRowEventArgs e)
{
e.NewRow.Errors.Clear();
}
private void BoardInfoGrid_OnCommittedNewRow(object sender, DataGridRowEventArgs e)
{
e.Row.Errors.Clear();
} |