Skip to main content

RepositoryItem.EditValueChanging Event

Fires when the editor’s value is about to be changed.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

Declaration

[DXCategory("Events")]
public event ChangingEventHandler EditValueChanging

Event Data

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

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
IsBoundUpdatingEditValue For internal use.
IsTextChanging For internal use.
ModifiedByUser Gets whether a user changed the value.
NewValue Gets or sets the value which is about to be assigned to the editor. Setting the NewValue property is not supported if the editor uses masked input (RepositoryItemTextEdit.Mask).
OldValue Gets the editor’s value.

Remarks

The EditValueChanging event is raised when the edit value (BaseEdit.EditValue) is about to be changed (in code or by a user). The potential new value can be identified by the ChangingEventArgs.NewValue parameter. The current edit value is identified by the ChangingEventArgs.OldValue parameter. To cancel the modification, set the Cancel parameter to true.

Note

Do not display modal dialogs or move focus within the EditValueChanging event, as this can lead to the loss of the current value.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditValueChanging 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