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

RepositoryItemTextEdit.Mask Property

Provides access to the editor’s mask settings.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v19.1.dll


public virtual MaskProperties Mask { get; }

Property Value

Type Description

A MaskProperties object which provides the editor’s mask settings.


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.


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

See Also