DevExpress editors allow you to use masks during editing. Masks are useful when a string entered by an end-user should match a specific format. For instance, you may require a text editor to only accept date/time values in a 24-hour format, only accept numeric values, or only accept numbers that are automatically inserted into the placeholders of a telephone number.
Masked input is supported by the following editor types:
-
Text box editors (TextBox and ButtonEdit).
Text box mask settings can be accessed via the MaskSettings property. The editor's mask can be specified via the MaskSettings.Mask property. -
Date editors (DateEdit).
To enable masked input within a date editor, the UseMaskBehavior property should be set to true. The mask can be defined via the EditFormatString property if the EditFormat property is set to 'Custom'.
In this demo, see how masked input behavior is implemented by entering data into the various types of editors.
See also: Documentation - Mask Types
Local Copy of this Demo To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer. |
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDataEditorsDemos |