バージョン

FormulaErrorValue プロパティ

列の式がエラーに評価された場合にデータソースに割り当てる値を指定します。列にFormulaが設定されていない場合、このプロパティは無視されます。
シンタックス
'宣言
 
Public Property FormulaErrorValue As Object
public object FormulaErrorValue {get; set;}
使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles ultraGrid1.InitializeLayout
        ' FormulaErrorValue specifies which value to send to the data source in case
        ' the formula associated with the cell evaluated to an error. NOTE: This does
        ' not specify what to display when there is a formula error. For that you
        ' will have to either hook into the UltraCalcManager's FormulaError event or
        ' localize the string resources.
        e.Layout.Bands(0).Columns("Date").FormulaErrorValue = New DateTime(1, 1, 1)
        e.Layout.Bands(0).Columns("currency").FormulaErrorValue = CType(-1, Decimal)
        e.Layout.Bands(0).Columns("string").FormulaErrorValue = "#ERR"
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
		{
			// FormulaErrorValue specifies which value to send to the data source in case
			// the formula associated with the cell evaluated to an error. NOTE: This does
			// not specify what to display when there is a formula error. For that you
			// will have to either hook into the UltraCalcManager's FormulaError event or
			// localize the string resources.
			e.Layout.Bands[0].Columns["Date"].FormulaErrorValue = new DateTime( 1, 1, 1 );
			e.Layout.Bands[0].Columns["currency"].FormulaErrorValue = -1m;
			e.Layout.Bands[0].Columns["string"].FormulaErrorValue = "#ERR";
		}
参照