We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exceptions in CurrentCellEditComplete Event

Thread ID:





693 Jul 31,2002 03:49 PM UTC Jul 31,2002 11:42 PM UTC WinForms 2
Tags: GridControl
Trevor Redfern
Asked On July 31, 2002 03:49 PM UTC

Does anyone know of any reason why all exceptions are handled with in the grid control on the edit complete event? I realize I can trap it before it exits the event handler and deal with it normally, basically how one would expect in this situation, but I'm more curious for tracking down issues, those exceptions can just disappear making it more difficult to figure out problems.

Stefan Hoenig [Syncfusion]
Replied On July 31, 2002 11:40 PM UTC

Hello Trevor, you can catch the CurrentCellDeactivateFailed or CurrentCellMoveFailed event to be notified when moving the current cell failed, e.g. because of an exception. In your handler of CurrentCellDeactivateFailed you can then Display a message box or throw the same exception again. Or if you directly called Validate() or ConfirmChanges() you can check the CurrentCell.ErrorMessage and CurrentCell.IsValid properties. Unfortunately, right now the exception itsself is not being saved. In our next build of Essential Grid we will provide a CurrentCell.Exception property in addition to the already available CurrentCell.ErrorMessage property. This will allow you to rethrow any Exception that was catched inside the CurrentCell methods. Within the Current Cell logic we voted to handle excpetions as a default behavior because there might be cell value conversions that might throw exceptions. For example, if you set CellValueType to be "Byte" and then the user types in a value > 255 a exception is thrown. If an exception dialog is shown, end users would then assume it is a bug in the grid. Stefan

Stefan Hoenig [Syncfusion]
Replied On July 31, 2002 11:42 PM UTC

I forgot. If you want to catch exceptions right at the point where they occur, you can do that very nicely with the Visual Studio Debugger when you select the Menu "Debug|Exceptions" and then select "Break Into Debugger" for CLR Exceptions. Stefan


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon