Back to Devexpress

RepositoryItem.FormatEditValue Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-31c6379f.md

latest3.1 KB
Original Source

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

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event ConvertEditValueEventHandler FormatEditValue
vb
<DXCategory("Events")>
Public Event FormatEditValue As ConvertEditValueEventHandler

Event Data

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

PropertyDescription
HandledGets or sets a value specifying whether default edit value conversion/formatting is required.
ValueGets 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

ParseEditValue

Formatting

Format and Parse Editor Values

RepositoryItem Class

RepositoryItem Members

DevExpress.XtraEditors.Repository Namespace