バージョン

FormulaCalculationErrorEventHandler デリゲート

IUltraCalcManagerのFormulaErrorイベントのデリゲート。
シンタックス
'宣言
 
Public Delegate Sub FormulaCalculationErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As Infragistics.Win.CalcEngine.FormulaCalculationErrorEventArgs _
) 
public delegate void FormulaCalculationErrorEventHandler( 
   object sender,
   Infragistics.Win.CalcEngine.FormulaCalculationErrorEventArgs e
)

パラメータ

sender
e
使用例
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;
			}
		}
参照