blazor-devexpress-dot-blazor-dot-dxdropdownbox-b0df63e8.md
Hides the editor’s drop-down window.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
public void HideDropDown()
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;
}
}
See Also