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
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
You may be able to add a Custom Search Box and Use "LoadData" to provide Custom "LoadDataArgs"