Unified Global Search box in Grid

I was looking for a Solution to implement a Global Search Box which will search in every Column just like Datatable in jQuery.

1 Like

Can be added as external functionality with a single click in Radzen Blazor Studio:

Thank you for your response, But I am not currently using Radzen Studio I am just testing various components of yours especially Grid.

Can we do it Programmatically ?

You may be able to add a Custom Search Box and Use "LoadData" to provide Custom "LoadDataArgs"

    <RadzenTextBox @bind-Value=@search TValue="string" Change=@OnSearch />
    <RadzenDataGrid Data="@UserList" Count="@count" TItem="User" LoadData="@LoadData">
        <Columns>
            <RadzenDataGridColumn TItem="User" Property="Username" Title="Username" />
            <RadzenDataGridColumn TItem="User" Property="Email" Title="Email" />
            <RadzenDataGridColumn TItem="User" Property="Age" Title="Age" />
        </Columns>
    </RadzenDataGrid>

Following is the working Example of OnSearch

void OnSearch(string Value)
    {
        var args = new LoadDataArgs
            {
                Filter = @$"(Username == null ? """" : Username).Contains(""{Value}"") OR (Email == null ? """" : Email).Contains(""{Value}"")"
            };

        LoadData(args);
    }
2 Likes

@mohiyo Yes this is exactly what I was looking for. Thanks :blush:

You may be able to add a Custom Search Box and Use "LoadData" to provide Custom "LoadDataArgs"