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

RepositoryItem.ParseEditValue Event

Converts an input value (the one that is entered by an end-user or assigned in code) to the value to be stored by the editor.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v18.1.dll

Declaration

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

Event Data

The ParseEditValue 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

Each time an end-user accepts the edited value or a new value is assigned to the editor in code, this value is converted to the appropriate type (numeric, date/time, etc). The ParseEditValue event fires at this time to allow you to implement a custom edit value conversion.

The event’s ConvertEditValueEventArgs.Value parameter allows you to obtain the current edit value. Set this parameter to the value that should actually be stored by the editor (for standalone editors, the new value is stored in the BaseEdit.EditValue property). You must set the ConvertEditValueEventArgs.Handled property value to true to prevent the default conversion from being invoked after your ParseEditValue event handler is complete.

Note

The ParseEditValue 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).

Refer to the Formatting topic for more information.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ParseEditValue event.

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