Back to Devexpress

SearchLookUpEdit.GetPopupEditForm() Method

windowsforms-devexpress-dot-xtraeditors-dot-searchlookupedit-89e9af20.md

latest3.0 KB
Original Source

SearchLookUpEdit.GetPopupEditForm() Method

Returns the control’s popup window.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public PopupSearchLookUpEditForm GetPopupEditForm()
vb
Public Function GetPopupEditForm As PopupSearchLookUpEditForm

Returns

TypeDescription
DevExpress.XtraEditors.Popup.PopupSearchLookUpEditForm

A DevExpress.XtraEditors.Popup.PopupSearchLookUpEditForm object that represents the control’s popup window. null ( Nothing in VB) if the popup window has not been opened yet.

|

Remarks

At runtime, the control’s popup window can be opened with a click on the control’s dropdown button, or in code using the PopupBaseEdit.ShowPopup method. After the popup window has been opened for the first time, you can use the GetPopupEditForm method to get access to the popup window object. If the popup window has not been opened yet, the GetPopupEditForm returns null ( Nothing in VB). Typically, you will be calling the GetPopupEditForm method in the PopupBaseEdit.Popup event handler to get access to the popup window after it has been opened. In the event handler, you can adjust the popup window settings, or handle its events. See the code below.

csharp
private void searchLookUpEdit1_Popup(object sender, EventArgs e) {
    DevExpress.XtraEditors.SearchLookUpEdit edit = sender as DevExpress.XtraEditors.SearchLookUpEdit;
    if (edit != null){
        DevExpress.XtraEditors.Popup.PopupSearchLookUpEditForm popupForm = edit.GetPopupEditForm();
        // ... 
    }
}
vb
Private Sub SearchLookUpEdit1_Popup(sender As Object, e As EventArgs) Handles SearchLookUpEdit1.Popup
    Dim edit As DevExpress.XtraEditors.SearchLookUpEdit = TryCast(sender, DevExpress.XtraEditors.SearchLookUpEdit)
    If edit IsNot Nothing Then
        Dim popupForm As DevExpress.XtraEditors.Popup.PopupSearchLookUpEditForm = edit.GetPopupEditForm()
        ' ...
    End If
End Sub

See Also

Popup

SearchLookUpEdit Class

SearchLookUpEdit Members

DevExpress.XtraEditors Namespace