Skip to main content
All docs
V24.1

DxDropDownBox.HideDropDown() Method

Hides the editor’s drop-down window.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public void HideDropDown()

Remarks

Call the HideDropDown method to close the editor’s drop-down window.

Run Demo: DropDown Box - Multiple Selection ListBox

<DxDropDownBox @bind-Value="Value" QueryDisplayText="QueryText">
    <DropDownBodyTemplate>
        <DxGrid @ref="Grid" SelectedDataItemChanged="@GridSelectedDataItemChanged" ... />
    </DropDownBodyTemplate>
</DxDropDownBox>

@code {
    // ...
    void GridSelectedDataItemChanged(object item) {
        DropDownBox.BeginUpdate();
        DropDownBox.Value = item;
        DropDownBox.HideDropDown();
        DropDownBox.EndUpdate();
    }

    string QueryText(DropDownBoxQueryDisplayTextContext arg) {
        if(arg.Value is Customer value)
            return value.ContactName;
        return string.Empty;
    }
}

Implements

See Also