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

CurrentCell data type validation

Thread ID:





57482 Mar 5,2007 08:28 PM UTC Mar 5,2007 10:18 PM UTC WinForms 2
Tags: GridControl
Julie Levy
Asked On March 5, 2007 08:28 PM UTC

Hi -
Is there a way to tell that validation has failed due to a data type error?
We are handling CurrentCellValidating but would like to display our own error message when the problem is due to the user inputting a wrong data type.

Administrator [Syncfusion]
Replied On March 5, 2007 10:06 PM UTC

Hi Julie,

You can handle the CurrentCellErrorMessage event of grid, which you can display your own custom message box whenever the grids CurrentCell.DisplayWarningText (as a result of some kind of validation error) is called.

Please refer the attached sample for the implementation.

private void gridDataBoundGrid1_CurrentCellErrorMessage(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellErrorMessageEventArgs e)
MessageBox.Show(e.Text,"NewError",MessageBoxButtons.OKCancel );
e.Cancel = true;

Best regards,

Julie Levy
Replied On March 5, 2007 10:18 PM UTC

Thanks Haneef.


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

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