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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CellButtonClick consuming my exceptions?

Thread ID:





30046 Jun 9,2005 04:07 PM UTC Jun 9,2005 05:35 PM UTC WinForms 1
Tags: GridControl
John Passarelli
Asked On June 9, 2005 04:07 PM UTC

In the CellButtonClicked event, if I throw an exception it does not bubble up, but rather the grid code consumes it (but does write it out to the debugger output). Is this by design? I am using version 3.0.1 of the GridDataBoundGrid.

Administrator [Syncfusion]
Replied On June 9, 2005 05:35 PM UTC

This is by design. Here the code.
public bool RaiseCellButtonClicked(int rowIndex, int colIndex, int index, GridCellButton button)
	TraceUtil.TraceCurrentMethodInfoIf(Switches.CurrentCell.TraceVerbose, PaneDesc, rowIndex, colIndex, index, button);
	GridCellButtonClickedEventArgs e = new GridCellButtonClickedEventArgs(rowIndex, colIndex, index, button);
	catch (Exception ex)
		if (!ExceptionManager.RaiseExceptionCatched(this, ex))
			throw ex;
		e.Cancel = true;
	return !e.Cancel;
This code also shows how you can make the grid rethrow the exception. It uses the ExceptionManager class in Shared. 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 Syncfusion.Windows.Forms.ExceptionManager.SuspendCatchExceptions = true; You can also hook an event (Syncfusion.Windows.Forms.ExceptionManager.ExceptionCatched) to get any exception thrown, and handle them yourself.


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

or the page will be automatically redirected to 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