Skip to main content

RepositoryItem.EditValueChanged Event

Fires when the editor’s EditValue property changes.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event EventHandler EditValueChanged

Event Data

The EditValueChanged event's data class is EventArgs.

Remarks

Editors raise the EditValueChanged event during the editing process, not after it is finished. For instance, if an editor has a text box, the EditValueChanged event fires each time the user types a new character.

The EditValueChangedFiringMode property specifies how the EditValueChanged event fires (immediately, or after a user has stopped editing).

Set the EditValueChangedFiringMode property to EditValueChangedFiringMode.Buffered to fire the EditValueChanged event with the delay. Use EditValueChangedDelay and EditValueChangedFiringDelay properties to specify the delay.

Tip

For BaseEdit descendants, you can type cast the event parameter to ChangingEventArgs to use additional information (for example, e.ModifiedByUser):

using DevExpress.XtraEditors.Repository;

void textEdit1_EditValueChanged(object sender, System.EventArgs e) {
    if(e is ChangingEventArgs args) {
        if(args.ModifiedByUser) {
            //...
        }
    }
}

Note

The EditValueChanged event notifies you about tha the editor’s value was changed and does not allow you to cancel/discard the action. If you need to cancel/discard the user input based on a specific condition, handle the EditValueChanging event.

Example

The following example shows how to respond to changing an editor’s value by handling the EditValueChanged event.

private void textEdit1_EditValueChanged(object sender, EventArgs e) {
    TextEdit textEditor = (TextEdit)sender;
    if(Equals(textEditor.EditValue, "000")) {
        //...
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditValueChanged 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