RepositoryItemTextEdit.Mask Property

Provides access to the editor's input mask.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[DXCategory("Format")]
public virtual MaskProperties Mask { get; }
<DXCategory("Format")>
Public Overridable ReadOnly Property Mask As MaskProperties

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 ";
gridControl1.RepositoryItems.Add(textEdit);
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.

See Also