Back to Devexpress

DxGrid.ShowSearchBox Property

blazor-devexpress-dot-blazor-dot-dxgrid-0f2cd0f8.md

latest2.6 KB
Original Source

DxGrid.ShowSearchBox Property

Specifies whether the Grid displays the search box.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(false)]
[Parameter]
public bool ShowSearchBox { get; set; }

Property Value

TypeDefaultDescription
Booleanfalse

true to display the search box; otherwise, false.

|

Remarks

The search box allows users to type text in the box editor to filter and highlight data. Set the ShowSearchBox property to true to display the search box.

razor
<DxGrid Data="@Data" ShowSearchBox="true">
    <Columns>
        <DxGridDataColumn FieldName="ContactName"/>
        <DxGridDataColumn FieldName="City"/>
        <DxGridDataColumn FieldName="Country"/>
    </Columns>
</DxGrid>

You can use the following members to customize the search box.

SearchBoxInputDelaySpecifies the time interval between the last typed character in the search box and the consequent search text update.SearchBoxNullTextSpecifies the prompt text displayed in the search box when it is empty.CustomizeElementAllows you to customize the search box style settings.SearchBoxTemplateAllows you to implement custom content for the search box.SearchTextAllows you to implement an external search box and bind its value to the grid search text.

Users can press Ctrl+F to focus the search box. For additional information about search in the Grid component, refer to the following topic: Search Box in Blazor Grid.

Run Demo: Grid - Search Box

Implements

ShowSearchBox

See Also

DxGrid Class

DxGrid Members

DevExpress.Blazor Namespace