Back to Devexpress

RepositoryItemPopupContainerEdit.QueryResultValue Event

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitempopupcontaineredit-8aa29d95.md

latest4.9 KB
Original Source

RepositoryItemPopupContainerEdit.QueryResultValue Event

Fires when closing the popup window, enabling you to specify the editor’s value based on the state of controls residing within the popup.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

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

Event Data

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

PropertyDescription
ValueGets or sets the editor value.

Remarks

Popup container editors let you display control(s) within their popup window. Hence, unlike other popup editors, it does not automatically assign the edit value when the end-user closes the dropdown window. Thus, you need to handle the QueryResultValue event to specify the edit value depending on the state of the controls displayed within the popup window. To specify the edit value, use the QueryResultValueEventArgs.Value parameter.

Note: the event is not raised if the popup window is closed discarding changes made in it. See the RepositoryItemPopupBase.CloseUp event description for the list of cases when changes are discarded.

You may need to perform reverse action - update the controls within the popup when the editor’s value changes. You may handle the RepositoryItem.EditValueChanged event for this purpose.

The editor’s PopupContainerEdit.QueryResultValue event is equivalent to the current event.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the QueryResultValue 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-gridlookupedit-multiple-item-selection/CS/Form1.cs#L21

csharp
RepositoryItemPopupContainerEdit ri = new RepositoryItemPopupContainerEdit();
ri.QueryResultValue += ri_QueryResultValue;
ri.EditValueChanged += ri_EditValueChanged;

winforms-gridlookupedit-multiple-item-selection/VB/Form1.vb#L18

vb
Dim ri As RepositoryItemPopupContainerEdit = New RepositoryItemPopupContainerEdit()
AddHandler ri.QueryResultValue, AddressOf ri_QueryResultValue
AddHandler ri.EditValueChanged, AddressOf ri_EditValueChanged

See Also

QueryResultValue

QueryCloseUp

CloseUp

QueryDisplayText

EditValue

Text

Popup Container Editor

RepositoryItemPopupContainerEdit Class

RepositoryItemPopupContainerEdit Members

DevExpress.XtraEditors.Repository Namespace