Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSearchBox.Buttons Property

Allows you to add command buttons to the Search Box.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment Buttons { get; set; }

#Property Value

Type Description
RenderFragment

A collection of buttons (UI fragments).

#Remarks

You can add command buttons to the Search Box:

  1. Add the <Buttons></Buttons> tag to the component’s markup to define the Buttons collection.
  2. Add DxEditorButton objects to the Buttons collection.
  3. Set up button properties to customize the buttons:
    • CssClass
    • Position
    • and so on

The following code snippet adds custom buttons to the Search Box.

Razor
<DxSearchBox @bind-Text="@Value"
             aria-label="Search" >
    <Buttons>
        <DxEditorButton IconCssClass="oi oi-arrow-thick-bottom"
                        Click="@OnPreviousButtonClick">
        </DxEditorButton>
        <DxEditorButton IconCssClass="oi oi-arrow-thick-top"
                        Click="@OnNextButtonClick">
        </DxEditorButton>
    </Buttons>
</DxSearchBox>

@code {
    string Value { get; set; }

    void OnPreviousButtonClick() {
        // your logic
    }
    void OnNextButtonClick()  {
        // your logic
    }
}

Search Box - Command Button

See Also