Back to Devexpress

RepositoryItemTokenEdit.CloseUp Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemtokenedit-83c0b482.md

latest5.9 KB
Original Source

RepositoryItemTokenEdit.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.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Events")]
public event CloseUpEventHandler CloseUp
vb
<DXCategory("Events")>
Public Event CloseUp As CloseUpEventHandler

Event Data

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

PropertyDescription
AcceptValueGets or sets a value indicating whether CloseUpEventArgs.Value should be accepted or discarded.
CloseModeGets a value indicating how the popup editor’s dropdown window was closed.
PressedButtonReturns which popup button has been pressed by an end-user.
ValueGets 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

Popup

BeforePopup

QueryPopUp

QueryCloseUp

Closed

RepositoryItemTokenEdit Class

RepositoryItemTokenEdit Members

DevExpress.XtraEditors.Repository Namespace