RepositoryItemTextEdit.Mask Property
Provides access to the editor’s mask settings.
Namespace: DevExpress.XtraEditors.Repository
Assembly: DevExpress.XtraEditors.v19.1.dll
Declaration
Property Value
Type | Description |
---|---|
MaskProperties | A MaskProperties object which provides the editor’s mask settings. |
Remarks
Applying a mask to the editor allows you to limit text input to end users. If masked mode is enabled, the editor validates the text against the mask and only allows data to be entered that satisfies the mask expression. To enable masked mode for an editor, set the MaskProperties.MaskType property and specify the mask using the MaskProperties.EditMask property.
The code below shows how to customize input in a date-time column.
RepositoryItemTextEdit textEdit = new RepositoryItemTextEdit();
textEdit.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTime;
textEdit.Mask.EditMask = "yyyy-MMM-d, HH:mm:ss ";
colOrderDate.ColumnEdit = textEdit;
To disable masked mode, set the MaskProperties.MaskType property to the MaskType.None value. Refer to the Input Mask document for more information on masks.
Note
The following editors do not support editing in masked mode: LookUpEdit, GridLookUpEdit, MemoEdit, MemoExEdit and ImageComboBoxEdit.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Mask property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.