Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I trap the form close event in a DataGridView RowValidation event?

I want to terminate validation if the RowValidation is triggered as a result of a form close event.

These are the parameters I have to play with:(System::Windows::Forms::DataGridViewCellCancelEventArgs^ e)
Posted
Updated 18-Jan-11 21:11pm
v2
Comments
Nish Nishant 18-Jan-11 15:53pm    
By exit event, do you mean the app exiting?

1 solution

Is the RowValidation triggered before the forms Closing event? If not you could set a private variable on the form that the form is about to be closed and then use that in the RowValidation to abort if the form is about to be closed.

Best Regards,
Manfred
 
Share this answer
 
Comments
Nish Nishant 20-Jan-11 14:09pm    
5. Proposed as answer.
Ger Hayden 21-Jan-11 3:27am    
No, I tried that in advance of posting the question. The rowvalidation occurs first.
Ger

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