Skip to main content

RepositoryItem.FormatEditValue Event

Enables you to format the editor’s value (change the editor’s value when the formatting mechanism is invoked).

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DXCategory("Events")]
public event ConvertEditValueEventHandler FormatEditValue

Event Data

The FormatEditValue event's data class is ConvertEditValueEventArgs. The following properties provide information specific to this event:

Property Description
Handled Gets or sets a value specifying whether default edit value conversion/formatting is required.
Value Gets or sets either the edit or the display value of an editor.

Remarks

When an edit value is about to be displayed onscreen by the editor, the formatting mechanism is invoked, which translates the edit value into the display value (or display text for text editors).

Before the default formatting mechanism is invoked, you can substitute the edit value with another one by handling the editor’s FormatEditValue event. After your event handler is complete, the new value will be formatted using the default formatting mechanism.

To provide a new edit value, use the Value event parameter. The Handled parameter must be set to true.

Note

The FormatEditValue event may be called multiple times consecutively. The number of calls is different for different editor types and it may also depend on the editor usage (standalone or embedded).

See Formatting to learn more.

See Also