Skip to main content

PopupBaseEdit.CancelPopup() Method

Closes the popup window discarding the changes made.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v22.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual void CancelPopup()

Remarks

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.

See Also