Hi Tom,
I regret for the inconvenience caused.
If you want to show the own error message when mouse overing the error icon without default message box in a grid then you should handle the ExceptionRaised event for handling the unknown exception(It has been raised while modifying the underlying data in datasource) and TableControlCurrentCellErrorMessage event for handling the known exception in a cell. Here is a code snippet to show this.
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);
}
}
void gridGroupingControl1_ExceptionRaised(object sender, ExceptionRaisedEventArgs e)
{
//If you want to set default error message then call the SetErrorText(sender, e.Inner.Text);
SetErrorText(sender, "Your Text Message Here....");
e.Cancel = true;
}
void gridGroupingControl1_TableControlCurrentCellErrorMessage(object sender, GridTableControlCurrentCellErrorMessageEventArgs e)
{
e.Inner.Cancel = true;
//If you want to set default error message then call the SetErrorText(sender, e.Exception.Message);
SetErrorText(sender, "Your Text Message Here....");
}
Please refer to the attached sample for implementation.
ModifiedNewErrorExample.zipLet me know if you are looking something different.
Best Regards,
Haneef