Skip to main content
All docs
V24.1

TokenEdit.CloseUp Event

Fires when the drop-down window is about to be closed and allows you to get and update the selected token.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DXCategory("Events")]
public event CloseUpEventHandler CloseUp

Event Data

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

Property Description
AcceptValue Gets or sets a value indicating whether CloseUpEventArgs.Value should be accepted or discarded.
CloseMode Gets a value indicating how the popup editor’s dropdown window was closed.
PressedButton Returns which popup button has been pressed by an end-user.
Value Gets or sets a value to assign to the editor’s edit value.

Remarks

The drop-down window can be opened if the following options are enabled:

  • ShowDropDown — specifies whether the drop-down window is shown when the user starts typing into the edit box.
  • ShowDropDownOnClick — specifies whether the drop-down window is shown when the user clicks within the edit box.

You can also use the MaxTokenCount property to specify the maximum number of tokens that the user can select. If this value is reached, the drop-down window is not opened.

You can call the ShowPopup() method in code to open the drop-down window.

The editor raises the following events before and after the drop-down window is opened:

  • QueryPopUp — fires before the drop-down window is opened and allows you to cancel the action. This event is equivalent to the editor’s QueryPopUp event.
  • BeforePopup — fires after the drop-down list is populated with tokens and allows you to customize the drop-down window that is about to be displayed. Use the editor’s GetPopupEditForm() method to get the drop-down window. This event is equivalent to the editor’s BeforePopup event.
  • Popup — fires after the drop-down window is opened. This event is equivalent to the editor’s Popup event.

When a user selects a token, the drop-down window is closed. You can call the ClosePopup() method in code to close the drop-down window.

The editor raises the following events before and after the drop-down window is closed:

  • QueryCloseUp — fires before the drop-down window is closed and allows you to cancel the action. The event does not fire if the ClosePopup() method is called with the closeMode parameter set to Immediate. This event is equivalent to the editor’s QueryCloseUp event.
  • CloseUp — fires when the drop-down window is about to be closed, and allows you to get and update the selected token. This event is equivalent to the editor’s CloseUp event.
  • Closed — fires after the drop-down window is closed and allows you to get the reason for closure. This event is equivalent to the editor’s Closed event.
See Also