Infragistics(R) NetAdvantage(R) Windows Forms
FormulaAbsoluteName Property
See Also  Example E-mail your feedback on this topic.
Infragistics.Win.UltraWinGrid Namespace > UltraGridColumn Class : FormulaAbsoluteName Property

Returns the absolute name of the column that you can use to refer to it in formulas.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property FormulaAbsoluteName As String
C# 
public string FormulaAbsoluteName {get;}

Example

Following code demonstrates the concept behid FormulaAbsoluteName property.

Visual BasicCopy Code
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid


    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button1.Click

        Dim column As UltraGridColumn = Me.ultraGrid1.DisplayLayout.Bands(0).Columns(0)

        ' FormulaAbsoluteName returns a string that identifies the column to the
        ' calc-manager. It is a fully qualified ultracalc reference path.
        MessageBox.Show(Me, "Column's aboslute name = " & column.FormulaAbsoluteName)

        ' You can use the FormulaAbsoluteName property to construct on-fly formulas.
        Dim formula As String = String.Format("max( [{0}] )", column.FormulaAbsoluteName)

        ' Evaluate the constructed formula.
        Dim result As Infragistics.Win.CalcEngine.UltraCalcValue
        result = Me.ultraCalcManager1.Calculate(formula)

        MessageBox.Show(Me, String.Format("Result of {0} formula is {1}", formula, result.ToString()))
    End Sub
C#Copy Code
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;


		private void button1_Click(object sender, System.EventArgs e)
		{
			UltraGridColumn column = this.ultraGrid1.DisplayLayout.Bands[0].Columns[0];
			
			// FormulaAbsoluteName returns a string that identifies the column to the
			// calc-manager. It is a fully qualified ultracalc reference path.
			MessageBox.Show( this, "Column's aboslute name = " + column.FormulaAbsoluteName );

			// You can use the FormulaAbsoluteName property to construct on-fly formulas.
			string formula = string.Format( "max( [{0}] )", column.FormulaAbsoluteName );

			// Evaluate the constructed formula.
			Infragistics.Win.CalcEngine.UltraCalcValue result;
			result = this.ultraCalcManager1.Calculate( formula );

			MessageBox.Show( this, string.Format( "Result of {0} formula is {1}", formula, result.ToString( ) ) );
		}

See Also