R
Ryan Liu
private void dt_RowDeleted(object sender, DataRowChangeEventArgs e)
{
int id= (int)e.Row["id", DataRowVersion.Original];
if(id >5)
{
e.Row.RejectChanges();
MessageBox.Show(this, "Can not delete!" + id);
}
}
When multile lines are selected and deleted from the datagrid by using
delete key.
The warning message showned by MessageBox.Show() always same. id never
changed, always the firt one.
Is this a known bug, any work around?
Thanks a lot!
Ryan Liu
{
int id= (int)e.Row["id", DataRowVersion.Original];
if(id >5)
{
e.Row.RejectChanges();
MessageBox.Show(this, "Can not delete!" + id);
}
}
When multile lines are selected and deleted from the datagrid by using
delete key.
The warning message showned by MessageBox.Show() always same. id never
changed, always the firt one.
Is this a known bug, any work around?
Thanks a lot!
Ryan Liu