dataGridView1_DataError ConstraintExceptio异常
ConstraintExceptio 主键异常,如下红色部分该如何写
private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
if (ConstraintException)
{
MessageBox.Show("编号已存在!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}