PopupBaseEdit.ClosePopup() Method
Closes the popup window accepting the changes made.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
Declaration
Remarks
The ClosePopup method lets you close the popup window and accept the changes made within it. Note: this method is not in effect for editors that only change their value only closing the popup window. For instance, the ColorEdit closes its dropdown immediately after changing the edited value so the popup cannot be open while the editor value is modified. Editors that allow value modifications while the dropdown is opened automatically save the modified value when the popup is closed (by clicking outside it or by pressing the key specified by the RepositoryItemPopupBase.CloseUpKey property or the ALT+DOWN ARROW key combination). Additionally, the MemoExEdit and ImageEdit editors provide an OK button within their popup windows.
The following events are raised when attempting to close the popup window:
- RepositoryItemPopupBase.QueryCloseUp. The event allows you to prevent the dropdown window from being closed.
- RepositoryItemPopupContainerEdit.QueryResultValue (for PopupContainerEdit only). Handle this event in order to supply the changed edit value.
- RepositoryItemPopupBase.CloseUp. The event enables you to specify whether modifications performed within the dropdown should be accepted or discarded.
To close the dropdown window discarding changes made, call the PopupBaseEdit.CancelPopup method.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ClosePopup() method.
Note
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.