Version

OnValueChanged Method

Fires ValueChanged event. This method gets called whenever the value in the control changes.
Syntax
'Declaration
 
Protected Overridable Sub OnValueChanged( _
   ByVal e As EventArgs _
) 
protected virtual void OnValueChanged( 
   EventArgs e
)

Parameters

e
Example
Following code prints out the value as it changes. Current value in the masked edit can be invalid. For example, in the case of a date, if the input hasn't been fully entered then a DateTime object can not be constructed. To find out if the masked edit has a valid value entered, following code uses IsFullyInput property. If the input is invalid, it prints out the text in the masked edit.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinMaskedEdit

  Private Sub UltraMaskedEdit1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ultraMaskedEdit1.ValueChanged

      ' ValueChanged gets fired whenever value inside the masked edit changes.
      ' Following code prints out the current value in the masked edit. If the value
      ' is invalid, then it prints out the text.

      If Me.UltraMaskedEdit1.IsFullyInput Then
          Debug.WriteLine("ValueChanged: Valid Value. Value = " & Me.ultraMaskedEdit1.Value.ToString())
      Else
          Debug.WriteLine("ValueChanged: Invalid Value. Text = " & Me.ultraMaskedEdit1.GetText(MaskMode.IncludeBoth))
      End If
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void ultraMaskedEdit1_ValueChanged(object sender, System.EventArgs e)
{
	// ValueChanged gets fired whenever value inside the masked edit changes.
	// Following code prints out the current value in the masked edit. If the value
	// is invalid, then it prints out the text.

	if ( this.ultraMaskedEdit1.IsFullyInput )
	{
		Debug.WriteLine( "ValueChanged: Valid Value. Value = " + this.ultraMaskedEdit1.Value.ToString( ) );
	}
	else
	{
		Debug.WriteLine( "ValueChanged: Invalid Value. Text = " + this.ultraMaskedEdit1.GetText( MaskMode.IncludeBoth ) );
	}
}
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