BaseCheckedListBoxControl.ItemChecking Event
Fires before an item’s check state changes and allows you to cancel the action.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Event Data
The ItemChecking event's data class is ItemCheckingEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
Index | Gets the index of the item whose checked state is about to be changed. |
IsBoundUpdatingEditValue | For internal use. Inherited from ChangingEventArgs. |
IsTextChanging | For internal use. Inherited from ChangingEventArgs. |
ModifiedByUser | Gets whether a user changed the value. Inherited from ChangingEventArgs. |
NewValue | Gets or sets a new checked state for the item. |
OldValue | Gets the item’s previous checked state. |
Remarks
The ItemChecking event fires when an item’s check state is about to be changed by the user or in code. The OldValue and NewValue event arguments return the current check state and the state that is about to be set. The Index event argument returns the processed item’s index. If items in the list box are filtered (see SearchControl), this argument returns the item’s index in the filtered list. To cancel the action, set the Cancel parameter to true.
The ItemCheck event fires after the check state changes.