Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DateTimeOffsetEdit.Closed Event

Occurs when the editor drop-down menu is closed. Allows you to identify what caused the menu to close.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[Browsable(true)]
[DXCategory("Events")]
[EditorBrowsable(EditorBrowsableState.Always)]
public override event ClosedEventHandler Closed

#Event Data

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

Property Description
CloseMode Gets a value that specifies why the popup editor’s dropdown window was closed.

#Remarks

Read the ClosedEventArgs.CloseMode property to learn how a menu was closed.

void DateTimeOffsetEdit1_Closed(object sender, ClosedEventArgs e) {
    switch (e.CloseMode) {
        case PopupCloseMode.ButtonClick:
            //a user clicked the editor drop-down button
            break;
        case PopupCloseMode.Cancel:
            //a user clicked "Cancel" or pressed Esc
            break;
        case PopupCloseMode.CloseUpKey:
            //a user pressed Alt+DownArrow, or another hotkey assigned
            //to the CloseUpKey property
            break;
        case PopupCloseMode.Immediate:
            //a user clicked ouside the drop-down menu
            break;
        case PopupCloseMode.Normal:
            //a user clicked "OK"
            break;
    }
}
See Also