Skip to main content
All docs
V24.2

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.2.dll

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