Version

Value Property

Gets or sets the data to be edited in the masked edit control.
Syntax
'Declaration
 
Public Property Value As Object
public object Value {get; set;}
Remarks

Use this property for binding puproses.

If Nullable is true and user has not input any text, this property will return DBNull. If Nullable is false and user has not input any text, masked edit will consider it an invalid input.

When EditAs property is set to AutoSense and no InputMask is specified, and this property is set to an object of supported type, masked edit will automatically use an appropriate default mask for that type. If an object of type that is not supported by the masked edit is assigned, it will throw an ArgumentException.

Example
Following code prints out the original value of the Value and then sets the Value property to current date and prints it out.

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

  Private Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button4.Click
      ' Get the value and print it out before setting the new value.
      Dim oldValue As Object = Me.ultraMaskedEdit1.Value
      Debug.WriteLine("Old value in the masked edit = " & oldValue.ToString())

      ' Set the value to current date and print out the Value property.
      Me.UltraMaskedEdit1.Value = DateTime.Now
      Debug.WriteLine("New value in the masked edit = " & Me.UltraMaskedEdit1.Value.ToString())
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void button4_Click(object sender, System.EventArgs e)
{
	// Get the value and print it out before setting the new value.
	object oldValue = this.ultraMaskedEdit1.Value;
	Debug.WriteLine( "Old value in the masked edit = " + oldValue.ToString( ) );
		
	// Set the value to current date and print out the Value property.
	this.ultraMaskedEdit1.Value = DateTime.Now;
	Debug.WriteLine( "New value in the masked edit = " + this.ultraMaskedEdit1.Value.ToString( ) );
}
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