Imports Infragistics.CalcEngine Imports Infragistics.Win.UltraWinCalcManager Private Sub UltraCalcManager1_FormulaCalculationError(ByVal sender As Object, ByVal e As Infragistics.CalcEngine.FormulaCalculationErrorEventArgs) Handles UltraCalcManager1.FormulaCalculationError Select Case e.ErrorInfo.Code Case UltraCalcErrorCode.Div 'e.ErrorDisplayIcon = errorIconDivideByZero e.ErrorDisplayText = "Divide by Zero Error" e.ErrorValue = "#Div" Case UltraCalcErrorCode.NA 'e.ErrorDisplayIcon = errorIconNA e.ErrorDisplayText = "A formula of NA was encountered" e.ErrorValue = "#NA" Case UltraCalcErrorCode.Num 'e.ErrorDisplayIcon = errorIconInvalidNumericValue e.ErrorDisplayText = "Invalid numeric values encountered" e.ErrorValue = "#Num" Case UltraCalcErrorCode.Value 'e.ErrorDisplayIcon = errorIconInvalidArgument e.ErrorDisplayText = "Invalid argument type encountered" e.ErrorValue = "#Value" End Select End Sub
using Infragistics.CalcEngine; using Infragistics.Win.UltraWinCalcManager; private void ultraCalcManager1_FormulaCalculationError(object sender, Infragistics.CalcEngine.FormulaCalculationErrorEventArgs e) { switch ( e.ErrorInfo.Code ) { case UltraCalcErrorCode.Div: //e.ErrorDisplayIcon = errorIconDivideByZero; e.ErrorDisplayText = "Divide by Zero Error"; e.ErrorValue = "#Div"; break; case UltraCalcErrorCode.NA: //e.ErrorDisplayIcon = errorIconNA; e.ErrorDisplayText = "A formula of NA was encountered"; e.ErrorValue = "#NA"; break; case UltraCalcErrorCode.Num: //e.ErrorDisplayIcon = errorIconInvalidNumericValue; e.ErrorDisplayText = "Invalid numeric values encountered"; e.ErrorValue = "#Num"; break; case UltraCalcErrorCode.Value: //e.ErrorDisplayIcon = errorIconInvalidArgument; e.ErrorDisplayText = "Invalid argument type encountered"; e.ErrorValue = "#Value"; break; } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2