Thanks for your link, the solution you refer to seems to work for the example I posted (VS 2008).
Code Snippet
void RowValidating(object sender, DataGridViewCellCancelEventArgs e)
{
DataGridView dv = (DataGridView)sender;
DataRowView rv = (DataRowView)dv.CurrentRow.DataBoundItem;
if (rv != null && rv[0] == DBNull.Value)
{
CreateKey();
if (CheckConstraints(rv))
{
rv.CancelEdit();
e.Cancel = true;
}
}
}
Regards,
Andreas Kranister
// [trapemiya]さんのリンクを見たら、この様なコメントがありましたので、助かりました。
// 有難うございます。