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

RepositoryItemTextEdit.Mask Property

Specifies the editor’s input mask. From v20.2, use the MaskSettings property to specify an input mask.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v20.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[Browsable(false)]
[DXCategory("Format")]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual MaskProperties Mask { get; }

Property Value

Type Description
MaskProperties

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

Remarks

Important

From v20.2, use the MaskSettings property to specify an input mask. See the following help topic for more information: Input Mask.

If an input mask is applied to an editor, users can only enter a value the mask permits. Use the following properties to specify a mask:

  • EditMask — gets or sets a string value that specifies a mask expression.
  • MaskType — specifies how to parse a mask expression. To disable the input mask, set this property to None.

The code below shows how to limit the 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;

Note

You cannot use input masks in the following editors: 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