Retain Filter when Load() for Grid (Legacy)

After I run await Load(); await grid0.Reload(); any Filters in the Grid are reset. Is there a way to retain the Filters and not lose them?

Reloading the grid does not reset the filters. What is in your Load method?

The Load method is the code generated by the CRUD.

It's run to get the latest set of records from the database (Ie. changes made by other users etc). The Filter I'm referring to is the filtering built into the Grid. When running Load(), the Sort, if changed by the user in the Grid is retained, the selected page is retained but the filter in the Grid is lost.

I would have thought the Filter, the Sort & Page applied by the user to the Grid would all be retained?

The Load method is probably loading the raw data from the database, thus missing all the filters that were applied in the grid. If the property bound to the grid's Data is refreshed, filters will automatically reset.


Yes, it does reset and that's the problem I'm trying to resolve. The sort remains and so does the paging for the grid. Why not the grid filters?

I guess this is something for someone at Radzen to look at, perhaps @korchev ??

Because you are invoking the page Load method. This will update the Data and thus the grid filters.

It's how the grid is implemented. StateHasChanged will render the entire component.

The point I'm making is that invoking the Load method retains Sort & Page but not the Filter

Can you check the attached project? It seems to retain the filter as expected after calling the Load method of the page. The project uses the Radzen Sample SQL database which can be created from thew new MSSQL Data Source screen (the Create Sample Schema button). (33.9 KB)

Thank you @korchev. I'll check it out