バージョン

NamedReferencesCollection クラス

計算ネットワークの NamedReference オブジェクトのコレクション。
シンタックス
'宣言
 
Public Class NamedReferencesCollection 
   Inherits Infragistics.Shared.KeyedSubObjectsCollectionBase
public class NamedReferencesCollection : Infragistics.Shared.KeyedSubObjectsCollectionBase 
解説

関連付けられたコントロールのない定数または計算値として使用するために NamedReference オブジェクトをコレクションへ追加します。

使用例
Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Imports Infragistics.Win.CalcEngine
Imports Infragistics.Win.UltraWinCalcManager


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

        ' Add two named references named N1 and N2. N2 multiplies the value of
        ' N1 by 2.
        Me.UltraCalcManager1.NamedReferences.Add("N1", "5")
        Me.ultraCalcManager1.NamedReferences.Add("N2", "2 * [N1]")
    End Sub


    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        ' Change the value of N1 from 5 to 20. This will cause the N2 to get 
        ' recalculated and NamedReferenceResultChanged will be raised.
        Me.UltraCalcManager1.NamedReferences("N1").Formula = "20"
    End Sub

    Private Sub UltraCalcManager1_NamedReferenceResultChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinCalcManager.NamedReferenceResultChangedEventArgs) Handles ultraCalcManager1.NamedReferenceResultChanged
        System.Diagnostics.Debug.WriteLine(e.NamedReference.Key _
            & " named reference got calculated. It's TypeOf value is " _
            & e.NamedReference.FormulaResult.ToDouble())
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
using Infragistics.Win.CalcEngine;
using Infragistics.Win.UltraWinCalcManager;


		private void button1_Click(object sender, System.EventArgs e)
		{
			this.ultraCalcManager1.NamedReferences.Clear( );

			// Add two named references named N1 and N2. N2 multiplies the value of
			// N1 by 2.
			this.ultraCalcManager1.NamedReferences.Add( "N1", "5" );
			this.ultraCalcManager1.NamedReferences.Add( "N2", "2 * [N1]" );
		}

		
		private void button2_Click(object sender, System.EventArgs e)
		{
			// Change the value of N1 from 5 to 20. This will cause the N2 to get 
			// recalculated and NamedReferenceResultChanged will be raised.
			this.ultraCalcManager1.NamedReferences["N1"].Formula = "20";
		}

		private void ultraCalcManager1_NamedReferenceResultChanged(object sender, Infragistics.Win.UltraWinCalcManager.NamedReferenceResultChangedEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine( e.NamedReference.Key 
				+ " named reference got calculated. It's value is " 
				+ e.NamedReference.FormulaResult.ToDouble() );
		}
参照