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

GDBG: Error Icon instead of messagebox

Thread ID:





66228 Jul 29,2007 05:38 AM UTC Aug 29,2007 04:36 AM UTC WinForms 2
Tags: GridControl
Richard Bysouth
Asked On July 29, 2007 05:38 AM UTC


I've been trying to get the sample code from your KB working:

However, I still get a messagebox displayed e.g. "Column 'Code' does not allow nulls" and don't see an error icon for the row.
I've tried handling the CurrentCellErrorMessage event and setting e.cancel=true however this doesn't fix it.

I'd just like to show an error icon for the row, no messagebox. When the user hovers over the icon they should see the error message.

what am i missing?

haneefm [Syncfusion]
Replied On July 30, 2007 04:02 PM UTC

Hi Richard,

The grid does not throw this exception(not null), and so does not really know what column caused it. It is your datasource that is throwing this exception. If you want to customize this from a grid event, try handling the ValiateFailed event, and in your handler set grid.CurrentCell.ErrorMessage. Below is a code snippet

this.gridDataBoundGrid1.ValidateFailed += new GridValidateFailedEventHandler(gridDataBoundGrid1_ValidateFailed);
void gridDataBoundGrid1_ValidateFailed(object sender, GridValidateFailedEventArgs e)
this.gridDataBoundGrid1.CurrentCell.ErrorMessage = string.Empty;
e.Handled = true;

Best regards,

Richard Bysouth
Replied On August 29, 2007 04:36 AM UTC

thanks Haneef - that works great!


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

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