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.v21.2.dll

NuGet Packages: DevExpress.Win.Design, 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.

See Also