Hi Tom,
One way you can do this by handling the ExceptionRaised event and set the e.Cancel = true; to cancel it.
private void gridGroupingControl1_ExceptionRaised(object sender, ExceptionRaisedEventArgs e)
{
//If you want to show the MessageBox then call MessageBox.Show method explictly.
//If you want to set default error message then call the SetErrorText(sender, e.Exception.Message);
SetErrorText(sender,"ExceptionRaised event your Text");
e.Cancel = true;
}
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);
}
}
Please refer to the attached sample for implementation.
ModifiedGGC_Sample_3ad9c9c3.zipLet me know if you are looking something different.
Best Regards,
Haneef