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

GridDataBound: exception event & integer column

Thread ID:

Created:

Updated:

Platform:

Replies:

17729 Aug 15,2004 05:14 AM UTC Aug 15,2004 08:22 AM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On August 15, 2004 05:14 AM UTC

Hello ! 1) Please help me how to implement the functionality with handling exceptions in GridDataBound control. How to catch canstraint exceptions or ConvertType exception on client side ? For example, in GridGroupingControl there was ExceptionRaised event. 2) I have the column with System.Int32 type. When I add new row, there is empty cell for this column. How to place 0 (zero) there ? Thanks.

Administrator [Syncfusion]
Replied On August 15, 2004 08:22 AM UTC

1) The class Syncfusion.Windows.Forms.ExceptionManager has static members that you can use to control how the grid handles exceptions. You can subscribe to the event Syncfusion.Windows.Forms.ExceptionManager.ExceptionCatched to get any exception thrown, and handle them yourself. Another option is to try to avoid the exceptions by handling CurrentCellValidating. In that event, you can do your own validation on grid.CurrentCell.renderer.ControlText to see if it is a valid value for the cell at grid.CurrentCell.RowIndex and grid.CurrentCell.ColIndex. If not, set grid.CurrentCell.ErrorMessage and e.Cancel = true. 2) Here is a forum thread on this topic. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=5027

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

;