Skip to main content
All docs
V24.1

LookUpEdit.SelectionChanging Event

Occurs before a user selects an item in the editor’s popup. This event works in Multiple Item Selection mode only.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event EventHandler<PopupSelectionChangingEventArgs> SelectionChanging

Event Data

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

Property Description
Cancel Gets or sets whether to cancel the change selection operation.
IsSelected Gets whether the item is selected.

Remarks

The SelectionChanging event allows you to retain the item’s selected state. The following code sample does not allow users to toggle the first item’s selection:

private void lookUpEdit1_SelectionChanging(object sender, DevExpress.XtraEditors.Controls.PopupSelectionChangingEventArgs e) {
    e.Cancel = e.RecordIndex == 0;
}
See Also