Skip to main content
A newer version of this page is available. .

RepositoryItemTextEdit.Mask Property

Provides access to the editor’s input mask.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DXCategory("Format")]
public virtual MaskProperties Mask { get; }

Property Value

Type Description
MaskProperties

A MaskProperties object that comprises the editor’s mask settings.

Remarks

A mask allows you to restrict user input. If a mask is applied, the editor allows the user to enter only the text that fits the mask expression. Use the MaskProperties.EditMask property to specify the mask expression and the MaskProperties.MaskType property to specify how to parse the expression. See Input Mask for more information.

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 None.

Note

The following editors do not support editing in masked mode: LookUpEdit, GridLookUpEdit, MemoEdit, MemoExEdit, and ImageComboBoxEdit.

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.

See Also