Hi there, been using Radzen for a while, love it so far! I'm trying to do something simple at the moment where I want to set a parameter in the URL and the code will grab that and filter a column by it, at the moment it only half works, I can see the number appears in the filter entry, but the grid does not filter by it.
If I focus on the filter box and press enter it still doesnt work.
If I press the Refresh button (which does grid.Reload()) then it does the filtering as desired.
What I would like to happen is as soon as the page loads the grid has already filtered by the URL paramater requiring no input from the user.
The code of interest is this:
var uri = nav.ToAbsoluteUri(nav.Uri);
QueryHelpers.ParseQuery(uri.Query).TryGetValue("company_id", out var companyIdFilter);
bool companyIdValid = int.TryParse(companyIdFilter, out var companyIdFilterValue);
@if (companyIdValid)
{
<button class="btn btn-primary btn-sm" @onclick="@(() => { nav.NavigateTo("users"); })">Clear Filter</button>
}
<RadzenGrid @ref="grid0"
AllowFiltering="true" FilterMode="FilterMode.Simple"
AllowPaging="true" PageSize="20" AllowSorting="true"
AllowColumnResize="true"
Data="@gridData" TItem="User">
<Columns>
<RadzenGridColumn TItem="User" Property="Id" Title="Id" />
<RadzenGridColumn TItem="User" Property="CompanyId" Title="CompanyId" FilterValue="companyIdValid ? companyIdFilterValue : null" />
...
Appreciate any help!