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.
Unfortunately, activation email could not send to your email. Please try again.

CurrentCell data type validation

Thread ID:

Created:

Updated:

Platform:

Replies:

57482 Mar 5,2007 03:28 PM Mar 5,2007 05:18 PM Windows Forms 2
loading
Tags: GridControl
Julie Levy
Asked On March 5, 2007 03:28 PM

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.
Thanks,
Julie

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

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.
InvalidDatatype.zip

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

Best regards,
Haneef

Julie Levy
Replied On March 5, 2007 05:18 PM

Thanks 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.

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.

;