Mask Edit Properties

Setting Custom Character

The MaskEdit provides the option to use custom character. The specified character can be allowed to enter in the Mask Edit Textbox by using the CustomCharacter property.

HidePromptOnLeave

The MaskEdit Textbox provides the option to hide the prompt when focus out from the control. The mask prompt is visible when you focus again to the control. The default value of HidePromptOnLeave is false.

Defining Input Mode

The MaskEdit supports two type of inputs such as text and password that have been assigned by using the enum values ej.InputMode.Text and ej.InputMode.Password. The default value for InputMode is text in MaskEdit.

Setting Mask Format

The MaskEdit provides the option to define the MaskFormat to the value. The default value for MaskFormat property is empty string.

The following table contains new mask characters and its functionalities.

Mask Character Functionalities
A Alphanumeric characters placeholder(entry required)
a Alphanumeric characters placeholder(entry optional)
9 Digit placeholder (entry optional)
> Convert all the characters that follow to uppercase.
< Convert all the characters that follow to lowercase.
C Character or space placeholder (entry optional).
? Letter placeholder. For example: a – z or A – Z.
& Character or space placeholder. It accepts the character except ANSI characters in the following ranges: 32-126 and 128-255.
\\ Which treats next character in mask string as literal.
N/# Digit placeholder(entry required)

The following steps explains the implementation of MaskEdit Properties.

Add the following code example in your ASPX page to render the Textbox control.

  • html
  • <ej:MaskEdit ID="mask" MaskFormat="99-999-CCCC" Value="123456" CustomCharacter="r" HidePromptOnLeave="true" InputMode="Text"  runat="server"> </ej:MaskEdit>

    The output for Mask Edit Textbox with its properties.

    Edit Textbox

    MaskEdit with MaskFormat

    MaskFormat

    MaskEdit with HidePromptOnLeave

    HidePromptOnLeave

    MaskEdit with prompt focus

    MaskEdit with focus

    MaskEdit with InputMode text

    InputMode text

    MaskEdit with CustomCharacter