Prevent RowSelect clearing column filter

When the RowSelect method is invoked it clears the datagrid filter and all rows are re-displayed.

I have a datagrid bound to a property which is populated by a method.
I can filter the grid rows sucessfully.

How do I prevent the filter being cleared when a row is selected?

@page "/fetchdata"
<PageTitle>Weather forecast</PageTitle>

@using FilteredGrid.Data
@using Radzen
@using Radzen.Blazor;

@inject WeatherForecastService ForecastService

<h1>Weather forecast</h1>

<RadzenDataGrid TItem="WeatherForecast"
                Data="Forecasts"
                AllowFiltering="true"
                FilterMode="FilterMode.Simple"
                FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
                SelectionMode="DataGridSelectionMode.Single"
                RowSelect="@OnRowSelect">
    <Columns>
        <RadzenDataGridColumn TItem="WeatherForecast" Property="Date" Title="Date" Filterable="false" />
        <RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureC" Title="Temperature C" Filterable="false" />
        <RadzenDataGridColumn TItem="WeatherForecast" Property="TemperatureF" Title="Temperature F" Filterable="false" />
        <RadzenDataGridColumn TItem="WeatherForecast" Property="Summary" Title="Summary" Filterable="true" />
        <!-- column to fill space -->
        <RadzenDataGridColumn TItem="WeatherForecast"/>
    </Columns>
</RadzenDataGrid>

@code {
    private IEnumerable<WeatherForecast> forecasts;

    private IList<WeatherForecast> Forecasts
    {
        // Simplified code. Actual code has forecasts populated when an event is received.
        // The forecasts then have some custom sorting/non-ui filtering applied
        get { return forecasts.Select(x => x).ToList(); }
    }

    protected override async Task OnInitializedAsync()
    {
        forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
    }

    private void OnRowSelect(WeatherForecast forecast)
    {
        SelectedForecast = forecast;
    }

   private WeatherForecast SelectedForecast { get; set; }   
}

This returns a new collection every time and will reset RadzenDataGrid. Try to avoid doing that in a getter - set it only once in e.g. OnInitializedAsync

In my case the contents of the list is populated on an event basis.
It then has to be custom sorted.
Row property updates will also be received on an event basis.

It there a different way of loading/populating the data that would better accomodate data that isn't static and fully present when the page is iniitalized?

You can set the property to its final value (after applying custom sorting and filtering).

void ApplyCustomSort()
{
    Forecasts = Forecasts.OrderBy(f => f.x);
}