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

ErrorProvider - Exception and gridcontrol

Thread ID:

Created:

Updated:

Platform:

Replies:

62953 Jun 26,2007 08:48 AM UTC Jun 26,2007 08:05 PM UTC WinForms 4
loading
Tags: GridControl
Chris
Asked On June 26, 2007 08:48 AM UTC

Hi,

I have read many forum posts about handling errors (with an errorprovider) in the grid. Now I want to achieve the same behavior as in the gridgrouping control.

I want to show an error icon in the cell that caused the error with a red background (like a frame) and white cell text.

Can you provide a small example on how to handle this?

Cheers,
Chris

haneefm [Syncfusion]
Replied On June 26, 2007 02:20 PM UTC

Hi Chris,

See the below forum threads that shows you "How to customize the error-icon in a cell?".
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=46953
http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=55049

Best regards,
Haneef

Chris
Replied On June 26, 2007 06:19 PM UTC

Hi Haneef,

thanks for your two forum threads but both threads describe the handling for a GGC and not a "normal" gridcontrol. I want to achieve the same behavior for the "normal" gridcontrol.

When I take this thread for example (that you mentioned):

http://www.syncfusion.com/support/Forums/message.aspx?&MessageID=55049

private void SetErrorText(object sender, string ErrorMsg)
{
GridGroupingControl grid = sender as GridGroupingControl;
foreach (CurrentRecordProperty prop in grid.Table.CurrentRecordManager.Properties)
{
if (prop.IsError)
prop.Exception = new Exception(ErrorMsg, prop.Exception.InnerException);
}
}

I have no "CurrentRecordManager" in my gridcontrol. So a small example would be great.

Cheers,
Chris

haneefm [Syncfusion]
Replied On June 26, 2007 07:29 PM UTC

Hi Chris,

Here is a minimal sample that shows you "How to set the ErrorIcon in a GridControl?".
ErrorIconInGridControl.zip

Best regards,
Haneef

Chris
Replied On June 26, 2007 08:05 PM UTC

Hi Haneef,

thank you for your sample. So when you enter a value and then click in another cell, the error icon is painted. But when you move to another cell with the cursor keys, no error icon is painted but you can't move to the other cell (because of the error). So how can I paint the error icon even in this mode (while moving to another cell with the cursor keys)?

Furthermore I recognized that when you click in another cell after the error is fixed the other cell shortly shows the error icon too?

Cheers,
Chris

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.

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

;