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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Suppressing Exception Catching

Thread ID:

Created:

Updated:

Platform:

Replies:

39393 Jan 5,2006 07:45 PM UTC Jan 6,2006 06:57 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 5, 2006 07:45 PM UTC

The Syncfusion KB says this: "How to control the way the grid handles the exceptions There is a class Syncfusion.Windows.Forms.ExceptionManager that has static members that you can use to control how the grid handles exceptions. For example, to suspend the grid''s error handling, try: [C#] Syncfusion.Windows.Forms.ExceptionManager.SuspendCatchExceptions(); [VB] Syncfusion.Windows.Forms.ExceptionManager.SuspendCatchExceptions() You can also hook an event (Syncfusion.Windows.Forms.ExceptionManager.ExceptionCatched) to get any exception thrown, and handle them yourself or re-throw them." *Where* should such a line of code be called from?

stanleyj [Syncfusion]
Replied On 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

CONFIRMATION

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.

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

;