Radzen DataGrid - pagination doesn't always work after custom filtering

Hello!

I have some trouble with the Radzen DataGrid over on Blazor ServerSide.

Consider a radzen DataGrid, with server-side loading. I am bringing all the data with the LoadData event.
I have a custom filter on one column, when I am filtering on it I am also calling grid.FirstPage(). I also have pagination, so lets say we have 3 pages with 10 items each. Also, rendering is set to Server only. No prerender.

The issue is that 50% of time, when I am on the second page of the table and I am applying the custom filter, the table reloads, the page index is reset to the first page, but the displayed results are matching those of the second page. There is no sorting taking place. If I click the second page, the result set doesn't change, the load data event is not even triggered, then if I click back on the first page the correctly paginated and filtered results are shown.

From the logs, I can see that when I am using the custom filter the load event is called twice. Both executions start at the same time based on the timestamps. So far, I can see that the load data event is triggered twice only when the custom filter is being used, so grid.FirstPage() is my suspect but idk what I can use to replace it.

In one event, the skip arg is set to 10 (because I am on the second page) and the custom filter is set and in the other event the skip arg is set to 0 and the custom filter is also applied. So both events know of the custom filter but one of them tries to also paginate the results. The result set returned by the event who finishes last is the one that is used so that is why the filtering works fine sometimes.

I need some help sorting this out, tried out some things, but the weird part is that in debug mode I only hit the breakpoint on loadData once. I was able to find the double trigger thingy from the logs.

After more investigation, I can describe the issue better.

A non-custom filter, will set the Skip arg to 0 by default, so the load event will know to filter based on the filter value and also reset the pagination. All in one switf go, it doesn't trigger the load event twice.

A custom filter doesn't do that, a call to FirstPage() is required.

When I apply the custom filter, the load event is triggered, with the filter value and Skip value which was already set to 10 in my case => the bad query.

After I call FirstPage() which sets the Skip arg 0 I get => the good query.

I can see that the OnChange event for the custom filter gets triggered after the first LoadData event, so in theory, the results of the first event should be overridden by calling FirstPage() on the OnChange method and re-triggering the LoadData event but it seems that that is not always the case.