Version

NotifyValueChanged Method

Notifies the CalcManager that the value of a control that is used in a formula has changed.
Syntax
'Declaration
 
Public Sub NotifyValueChanged( _
   ByVal control As Control _
) 
public void NotifyValueChanged( 
   Control control
)

Parameters

control
The control whose value has changed.
Remarks

This method allows the programmer to manually mark the CalcSettings of a control dirty. This is usually not necessary, depending on the PropertyName property. If the property being used has a corresponding PropertyChanged event, then the UltraCalcManager will automatically hook into this property changed notification. Likewise, if the control is being used as the target of a formula, and not the source, this notification is unneccessary. For example, if the PropertyName is "Text", UltraCalcManager will hook the "TextChanged" event. If no such event exists on the control, then the CalcManager cannot detect a change in the Text of the control. In that case, the program will need to call NotifyValueChanged whenever the Text of the control is dirtied.

Example
Typically there is no need to call NotifyValueChanged. UltraCalcManager hooks into the Changed event correspnding to the property the calc settings is bound to and uses that to automatically recalculate any dependant formulas whenever the value in the control changes. For example if the calc settings is using the Text property then it hooks into the TextChanged event of the textbox and every time that event is fired it will recalculate the dependants. This method comes in use when you want to use a control as a source to a formula and the control doesn't have a proper Changed event. In that case you can call NotifyValueChanged for that control everytime its value changes.

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.NotifyValueChanged(Me.inputControl1)
    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.NotifyValueChanged( this.inputControl1 );
		}
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