Back to Devexpress

RepositoryItemComboBox.SelectedValueChanged Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemcombobox-78df7b5b.md

latest4.1 KB
Original Source

RepositoryItemComboBox.SelectedValueChanged Event

Occurs after changing the index of the selected value in the combo box editor.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event EventHandler SelectedValueChanged
vb
<DXCategory("Events")>
Public Event SelectedValueChanged As EventHandler

Event Data

The SelectedValueChanged event's data class is EventArgs.

Remarks

The SelectedValueChanged event occurs after changing the value of the ComboBoxEdit.SelectedIndex property. This property denotes the index of the selected value, which is provided by the ComboBoxEdit.SelectedItem property and displayed in the control’s edit box.

The SelectedValueChanged event occurs at the same time as the RepositoryItemComboBox.SelectedIndexChanged event. You can use these events interchangeably in your code. SelectedValueChanged is only provided for compatibility with the standard ComboBox control.

See the RepositoryItemComboBox.SelectedIndexChanged topic for more information.

The editor’s ComboBoxEdit.SelectedValueChanged event is equivalent to the current event.

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

create-a-federated-data-source-at-runtime/CS/FederationDataSourceExample/Form1.cs#L25

csharp
comboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
comboBoxEdit1.Properties.SelectedValueChanged += Properties_SelectedValueChanged;

create-a-federated-data-source-at-runtime/VB/FederationDataSourceExample/Form1.vb#L23

vb
comboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
AddHandler comboBoxEdit1.Properties.SelectedValueChanged, AddressOf Properties_SelectedValueChanged

See Also

SelectedValueChanged

SelectedIndexChanged

RepositoryItemComboBox Class

RepositoryItemComboBox Members

DevExpress.XtraEditors.Repository Namespace