Skip to main content

PopupBaseEdit.CancelPopup() Method

Closes the popup window discarding the changes made.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation


public virtual void CancelPopup()


The CancelPopup method closes the popup window and restores the editor’s previous value (i.e. before invoking the window). Note: this method is only useful for editors whose popup windows are not closed immediately after changing edit values. For instance, choosing a date within the date editor’s dropdown calendar immediately closes the dropdown. For an editor that can update its value while the dropdown is open, end-users can press the ESC key to close the dropdown discarding changes made. MemoExEdit and ImageEdit editors also provide the Cancel button within their dropdowns for this.

The following events are raised when attempting to close an editor’s dropdown window:

To close the dropdown window accepting changes, use the PopupBaseEdit.ClosePopup method.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CancelPopup() method.


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.

See Also