ejMaskEdit
Namespace: Wisej.Web.Ext.Syncfusion
Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)
The MaskEdit control provides an easy and reliable way of collecting user input and displaying standard data in a specific format. Some common uses of the MaskEdit control are IP address editors, phone number editors, and Social Security number editors.
- C#
- VB.NET
public class ejMaskEdit : ejBase
Public Class ejMaskEdit
Inherits ejBase
Constructors
ejMaskEdit()
Constructs a new instance of the ejMaskEdit class.
Example:
The following example creates the masked editor and sets the mask through the options.
var maskEdit = new ejMaskEdit();
maskEdit.Options.maskFormat = "99-999-9999";
maskEdit.Location = new Point(20, 20);
this.Controls.Add(maskEdit);
ejMaskEdit(options)
Constructs a new instance of the ejMaskEdit class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a masked editor for a phone number with an initial value.
var maskEdit = new ejMaskEdit(new
{
maskFormat = "(999) 999-9999",
value = "5551234567",
watermarkText = "Phone number"
});
this.Controls.Add(maskEdit);
Properties
Text
String: Gets or sets the text for the ejMaskEdit. (Default: "")
The property reads and writes the value option of the widget and raises the TextChanged event every time it is assigned. It is not updated when the user changes the text in the browser: handle the change event of the widget to receive the value entered by the user.
Example:
// set the value shown in the widget.
this.maskEdit1.Text = "5551234567";
// receive the value entered by the user.
this.maskEdit1.Instance.onChange += new WidgetEventHandler((s, e) =>
{
AlertBox.Show($"Value: {e.Data.value}");
});