windowsforms-devexpress-dot-xtraeditors-dot-baseedit-aeae61f4.md
Fires immediately after the edit value has been changed.
Namespace : DevExpress.XtraEditors
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.
The edited value is specified by the BaseEdit.EditValue property. Each time this property value changes, the EditValueChanged event is raised.
The editor’s EditValueChanged event is equivalent to the RepositoryItem.EditValueChanged event available via the BaseEdit.Properties object, i.e. adding/removing an event handler for the current event actually affects the RepositoryItem.EditValueChanged event.
See the RepositoryItem.EditValueChanged topic for more information.
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.
{
baseLookUp.EditValueChanged -= baseLookUp_EditValueChanged;
baseLookUp.EditValueChanged += baseLookUp_EditValueChanged;
teText.TextChanged += (s, e) => RaiseChanged();
cpeColor.EditValueChanged += (s, e) => RaiseChanged();
seFontSize.EditValueChanged += (s, e) => RaiseChanged();
lookUpLabelProduct.Properties.ValueMember = "Id";
lookUpLabelProduct.EditValueChanged += LookUpLabelProduct_EditValueChanged;
lookUpLabelProduct.Properties.EndInit();
winforms-combobox-hide-specific-items/CS/MyComboBoxEdit/Form1.cs#L10
InitializeComponent();
this.indexesCheckedComboBox.EditValueChanged += indexesCheckedComboBox_EditValueChanged;
this.indexesCheckedComboBox.Properties.EditValueType = DevExpress.XtraEditors.Repository.EditValueTypeCollection.List;
winforms-data-lookups-combobox-mode/CS/Lookup-ComboboxMode/Form1.cs#L25
void initLookupEdit() {
lookUpEdit1.EditValueChanged += LookUpEdit1_EditValueChanged; ;
lookUpEdit1.Properties.NullText = "(select or type value)";
If baseLookUp IsNot Nothing AndAlso filteredLookUp IsNot Nothing Then
RemoveHandler baseLookUp.EditValueChanged, AddressOf baseLookUp_EditValueChanged
AddHandler baseLookUp.EditValueChanged, AddressOf baseLookUp_EditValueChanged
AddHandler teText.TextChanged, Sub(s, e) RaiseChanged()
AddHandler cpeColor.EditValueChanged, Sub(s, e) RaiseChanged()
AddHandler seFontSize.EditValueChanged, Sub(s, e) RaiseChanged()
lookUpLabelProduct.Properties.ValueMember = "Id"
AddHandler lookUpLabelProduct.EditValueChanged, AddressOf LookUpLabelProduct_EditValueChanged
lookUpLabelProduct.Properties.EndInit()
winforms-combobox-hide-specific-items/VB/MyComboBoxEdit/Form1.vb#L14
InitializeComponent()
AddHandler indexesCheckedComboBox.EditValueChanged, AddressOf indexesCheckedComboBox_EditValueChanged
indexesCheckedComboBox.Properties.EditValueType = DevExpress.XtraEditors.Repository.EditValueTypeCollection.List
winforms-data-lookups-combobox-mode/VB/Lookup-ComboboxMode/Form1.vb#L23
Private Sub initLookupEdit()
AddHandler lookUpEdit1.EditValueChanged, AddressOf LookUpEdit1_EditValueChanged
lookUpEdit1.Properties.NullText = "(select or type value)"
See Also