How to cancel deleting a row in an event

  • Thread starter Thread starter Hamed
  • Start date Start date
H

Hamed

Hello

I need an event to be able to cancel a delete request to a DataRow object in
some conditions. It seems DataRowDeleting should be able to do the job but
setting e.Action is impossible (it is read-only)

How can I do the above job?

Thanks in advance
Hamed
 
Thanks Cor but in the code you mentioned if a cell is selected but the whole
row is not selected, it will be deleted that is not a desired occurrence.

any other suggestion is appreciated

Hamed
 
Honestly, I give up on controlling/cancelling row deletion. Instead I don't
allow deletion before it happens..
 
Back
Top