ST
stanleyj
Syncfusion Team
January 6, 2006 06:57 AM UTC
Hi Plioi,
If you want to catch errors while the grid is being initially created then you may subscribe this handler in the form''s constructor before the InitializeComponent call, as the grid is usually created in the InitializeComponent call from the forms constructor.
ExceptionManager.ExceptionCatched += new ExceptionCatchedEventHandler(ExceptionManager_ExceptionCatched);
Then in the handler you would condition resume or suspend CatchExceptions depending upon what you want the grid to do.
private void ExceptionManager_ExceptionCatched(object sender, ExceptionCatchedEventArgs e)
{
// if you want the grid to rethrow the exception, call ExceptionManager.SuspendCatchExceptions();
// if you want the grid to eat the exception (ignore it), then call ExceptionManager.ResumeCatchExceptions();
}
Best regards,
Stanley