Skip to main content

RepositoryItem.EditFormat Property

Provides access to the settings used to format the edit value when the editor has input focus.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Format")]
public virtual FormatInfo EditFormat { get; }

Property Value

Type Description
FormatInfo

A FormatInfo object containing the formatting settings applied to the edited value when the editor has input focus.

Remarks

When an editor is about to receive input focus, the edit value is pre-formatted using the settings provided by the EditFormat property. Note that this occurs only when the editor’s MaskProperties.MaskType property is set to MaskType.None, MaskType.RegEx, MaskType.Regular or MaskType.Simple. After this, if any of these mask modes are enabled, the result is formatted by the mask and displayed within the edit box.

Note

Formatting imposed by the EditFormat property is in effect when the editor value type matches the EditFormat.FormatType property value (FormatInfo.FormatType). So, if the FormatType property is set to Numeric, the editor must display numeric values. If the FormatType property is set to DateTime, the editor’s values must be of the date-time type. In bound mode, the editor value type is determined by the type of the bound field. In unbound mode, the value type must be specified explicitly: by assigning a value of the required type to the editor’s BaseEdit.EditValue property, or by setting the MaskProperties.MaskType property of the RepositoryItemTextEdit.Mask object to Numeric, DateTime or DateTimeAdvancingCaret.

Note

The RepositoryItem.DisplayFormat and RepositoryItem.EditFormat properties are not supported by: 1) Editors that do not provide the text editing feature 2) Lookup editors.

For detailed information about edit value formatting, see the Formatting Display and Edit Values topic.

See Also