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.

Displaying custom validation message

Thread ID:





62735 Jun 21,2007 01:55 AM Jun 21,2007 01:45 PM Windows Forms 1
Tags: GridControl
Anchit Sharma
Asked On June 21, 2007 01:55 AM

I am using the event TableControlCurrentCellErrorMessage on a grid GroupingControl to display Message Boxes with custom error messages.That works fine for most validations like invalid value for DateTime or Int16 etc.But for null value errors or range violations a message box appears with text -
"Save Record : null values not allowed in " .The code I am working on takes the name of the table at runtime . Therefore i do not know the name of the colmn during compile time .
How can i display the same message box but with custom error message.
As mentioned in one of your other threads
i tried using the event TableControlCurrentCellValidating but that disables ur default validations if i build my custome validation in it.
The objective is to use the already built in validations (null and range violations)but with a different message text. How do i achieve this?

haneefm [Syncfusion]
Replied On June 21, 2007 01:45 PM

Hi Anchit,

If you wan to catch the exception then, you need to handle the Table.ExceptionRaised event and set e.Cancel to true. Here is a code snippet

ggc.Table.ExceptionRaised += new Syncfusion.Grouping.ExceptionRaisedEventHandler(Table_ExceptionRaised);
void Table_ExceptionRaised(object sender, Syncfusion.Grouping.ExceptionRaisedEventArgs e)
e.Cancel = true;

Below is a forum thread that shows this task.

Best regards,


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.