Version

InvalidChar Event

Occurs when the user types a character that fails mask validation.
Syntax
'Declaration
 
Public Event InvalidChar As UltraMaskedEdit.InvalidCharEventHandler
public event UltraMaskedEdit.InvalidCharEventHandler InvalidChar
Event Data

The event handler receives an argument of type Infragistics.Win.UltraWinMaskedEdit.InvalidCharEventArgs containing data related to this event. The following InvalidCharEventArgs properties provide information specific to this event.

PropertyDescription
Beep  
Char  
DisplayChar  
Remarks
The InvalidChar event is fired when user types a character that does not match the input mask associated with the current input position.
Example
Following code shows properties available in InvalidChar event.

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_InvalidChar(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinMaskedEdit.InvalidCharEventArgs) Handles ultraMaskedEdit1.InvalidChar
      ' InvalidChar gets fired when the user types in a character that doesn't
      ' match the mask.

      ' You can change the masked edit's default behaviour of beeping by setting the
      ' Beep to false.
      e.Beep = False
  End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinMaskedEdit;
using System.Diagnostics;

private void ultraMaskedEdit1_InvalidChar(object sender, Infragistics.Win.UltraWinMaskedEdit.InvalidCharEventArgs e)
{
	// InvalidChar gets fired when the user types in a character that doesn't
	// match the mask.

	// You can change the masked edit's default behaviour of beeping by setting the
	// Beep to false.
	e.Beep = false;
}
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