windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitem-b409553f.md
Fires when the editor’s EditValue property changes.
Namespace : DevExpress.XtraEditors.Repository
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event EventHandler EditValueChanged
<DXCategory("Events")>
Public Event EditValueChanged As EventHandler
The EditValueChanged event's data class is EventArgs.
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.
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")) {
//...
}
}
Private Sub TextEdit1_EditValueChanged(sender As Object, e As EventArgs) Handles TextEdit1.EditValueChanged
Dim textEditor As TextEdit = CType(sender, TextEdit)
If Equals(textEditor.EditValue, "000") Then
'...
End If
End Sub
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.
winforms-gridlookupedit-multiple-item-selection/CS/Form1.cs#L22
ri.QueryResultValue += ri_QueryResultValue;
ri.EditValueChanged += ri_EditValueChanged;
ri.Popup += ri_Popup;
winforms-grid-add-radio-group-column/CS/Helper/GridRadioGroupColumnHelper.cs#L96
RadioRepositoryItem.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Radio;
RadioRepositoryItem.EditValueChanged += RadioRepositoryItem_EditValueChanged;
_GridView.GridControl.RepositoryItems.Add(RadioRepositoryItem);
winforms-grid-update-row-style-on-cell-value-change/CS/Form1.cs#L47
gridView1.Columns["B"].ColumnEdit = riTrackBar;
riCheckEdit.EditValueChanged += OnEditValueChanged;
riTrackBar.EditValueChanged += OnEditValueChanged;
winforms-grid-add-new-row-by-typing-in-new-item-row/CS/WindowsApplication3/Main.cs#L51
for(int i = 0; i < gridView.VisibleColumns.Count; i++)
gridView.VisibleColumns[i].RealColumnEdit.EditValueChanged += OnEditValueChanged;
}
winforms-workspacemanager-saving-load-app-layout/CS/T190543/Form1.cs#L47
this.repositoryItemComboBox1.Items.AddRange(Enum.GetValues(typeof(TransitionType)));
this.repositoryItemComboBox1.EditValueChanged += repositoryItemComboBox1_EditValueChanged;
winforms-gridlookupedit-multiple-item-selection/VB/Form1.vb#L19
AddHandler ri.QueryResultValue, AddressOf ri_QueryResultValue
AddHandler ri.EditValueChanged, AddressOf ri_EditValueChanged
AddHandler ri.Popup, AddressOf ri_Popup
winforms-grid-add-radio-group-column/VB/Helper/GridRadioGroupColumnHelper.vb#L96
RadioRepositoryItem.CheckStyle = DevExpress.XtraEditors.Controls.CheckStyles.Radio
AddHandler RadioRepositoryItem.EditValueChanged, AddressOf RadioRepositoryItem_EditValueChanged
_GridView.GridControl.RepositoryItems.Add(RadioRepositoryItem)
winforms-grid-update-row-style-on-cell-value-change/VB/Form1.vb#L46
gridView1.Columns("B").ColumnEdit = riTrackBar
AddHandler riCheckEdit.EditValueChanged, AddressOf OnEditValueChanged
AddHandler riTrackBar.EditValueChanged, AddressOf OnEditValueChanged
winforms-grid-add-new-row-by-typing-in-new-item-row/VB/WindowsApplication3/Main.vb#L45
For i As Integer = 0 To gridView.VisibleColumns.Count - 1
AddHandler gridView.VisibleColumns(i).RealColumnEdit.EditValueChanged, AddressOf OnEditValueChanged
Next
winforms-workspacemanager-saving-load-app-layout/VB/T190543/Form1.vb#L45
repositoryItemComboBox1.Items.AddRange([Enum].GetValues(GetType(TransitionType)))
AddHandler repositoryItemComboBox1.EditValueChanged, AddressOf repositoryItemComboBox1_EditValueChanged
transitionItem.EditValue = TransitionType.Push
See Also