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.

How to control column data type error message

Thread ID:

Created:

Updated:

Platform:

Replies:

36231 Oct 24,2005 10:12 AM Oct 24,2005 01:53 PM Windows Forms 2
loading
Tags: GridControl
Justin
Asked On October 24, 2005 10:12 AM

I have a grid that has a column defined as type Int16. The tab event correctly informs me if a have a non-Int16 value in this cell with the error message: "2147483648 is not a valid value for Int16.". Is there a way to customize this error message to make it read something like: "Quantity is an invalid number."? Thank you.

Administrator [Syncfusion]
Replied On October 24, 2005 11:25 AM

Here is a KB discussing one to handle this. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=26 This KB discusses actually validating the value yourself. If you just want to react to a bad value, then in a GridDataBoundGrid, you can catch the grid.ValidationFailed event. There, you can set grid.CurrentCell.ErrorMessage to be the string you want displayed. In a GridControl, instead of grid.ValidateFailed, you catch grid.CurrentCellMoveFailed and set grid.CurrentCell.ErrorMessage to be the string you want displayed.

Justin
Replied On October 24, 2005 01:53 PM

Thank you Clay - this worked perfectly! Justin

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.

;