Version

FormulaErrorValue Property

Specifies the value to assign to the data source if the column’s formula evaluates to an error. If the column doesn’t have Formula set, this property is ignored.
Syntax
'Declaration
 
Public Property FormulaErrorValue As Object
public object FormulaErrorValue {get; set;}
Example
Following code sets FormulaErrorValue on three different columns.

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";
		}
Requirements

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

See Also