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

System.FormatException when deleting a value

Thread ID:

Created:

Updated:

Platform:

Replies:

72776 Apr 4,2008 07:24 AM UTC Apr 23,2008 10:37 PM UTC WinForms 1
loading
Tags: GridControl
Zvonko Mihelic
Asked On April 4, 2008 07:24 AM UTC

I'm using Essential Suite 3.0.1.0.
I have a databound grid and in it is a column with data type 'int'. So, what I'm not managing to do is when someone presses Delete, or Back Space or writes some letters in that column, the value is automaticly changed to 0. In that way prevent the MessageBox with the System.FormatExcetion from showing.

I tried with SaveCellFormattedText event, SaveCellInfo event, nothing showed results I wanted...


haneefm [Syncfusion]
Replied On April 23, 2008 10:37 PM UTC

Hi Zvonko,

In the Essential Studio 4.2, We have newly added a CurrentCellErrorMessage event which you can handle and display your own custom message box whenever the grids CurrentCell.DisplayWarningText (as a result of some kind of validation error) is called. Please refer to the attached sample for implementation.

Sample: GDBGErrorMessage.zip

private void gridDataBoundGrid1_CurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellErrorMessageEventArgs e)
{
e.Cancel = true;
}

Best Regards,
Haneef


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

;