Click here to Skip to main content
15,843,137 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi all,

I have a DataGridView in which I was checking if the user delete its content, its entire row will be removed,

I tried the Cell_Validating event but it can't removes the row containing the validating cell.

I also tried the events Cell_EndEdit, Row_Leave and Cell_Validated but it was giving me the last data before deleting it not the empty Cell.

Please I need help,

Thanks in advance,
Updated 1-Mar-11 21:36pm

1 solution

Have you tried handling the DataGridView.RowLeave[^] event?

Use the e.RowIndex to iterate over the row checking the cell contents.
Share this answer
Michael Waguih 1-Mar-11 8:43am    
Thank you but it didn't work !!!!!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900