Back to Devexpress

PopupContainerEdit.QueryDisplayText Event

windowsforms-devexpress-dot-xtraeditors-dot-popupcontaineredit-c06de0dd.md

latest4.6 KB
Original Source

PopupContainerEdit.QueryDisplayText Event

Enables you to specify the textual representation of the editor’s value.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Event Data

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

PropertyDescription
DisplayTextGets or sets the text to display in the edit box.
EditValueGets the current edit value.

Remarks

The QueryDisplayText event is raised before the editor updates its display text. Handle it to perform custom edit value formatting.

The editor’s QueryDisplayText event is equivalent to the RepositoryItemPopupContainerEdit.QueryDisplayText event available via the editor’s Properties property, i.e. adding/removing an event handler for the current event actually affects the RepositoryItemPopupContainerEdit.QueryDisplayText event.

Refer to the RepositoryItemPopupContainerEdit.QueryDisplayText event description for more information.

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

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.

winforms-create-editable-grid-lookup/CS/PopupContainerEditSelection/Form1.cs#L30

csharp
popupContainerEdit1.Properties.ShowPopupCloseButton = false;
popupContainerEdit1.QueryDisplayText += new DevExpress.XtraEditors.Controls.QueryDisplayTextEventHandler(popupContainerEdit1_QueryDisplayText);
popupContainerEdit1.QueryResultValue += new DevExpress.XtraEditors.Controls.QueryResultValueEventHandler(popupContainerEdit1_QueryResultValue);

winforms-create-editable-grid-lookup/VB/PopupContainerEditSelection/Form1.vb#L23

vb
popupContainerEdit1.Properties.ShowPopupCloseButton = False
AddHandler popupContainerEdit1.QueryDisplayText, New DevExpress.XtraEditors.Controls.QueryDisplayTextEventHandler(AddressOf popupContainerEdit1_QueryDisplayText)
AddHandler popupContainerEdit1.QueryResultValue, New DevExpress.XtraEditors.Controls.QueryResultValueEventHandler(AddressOf popupContainerEdit1_QueryResultValue)

See Also

QueryDisplayText

QueryResultValue

TextEditStyle

Popup Container Editor

PopupContainerEdit Class

PopupContainerEdit Members

DevExpress.XtraEditors Namespace