I am using the RadzenDataGrid with the LoadData event to load data from the database. I have column filtering enabled and when a filter value is updated and the LoadData returns successful.
I am trying to implement persistence on the grid state when the user leaves the grid and comes back, they will have the same page number, sorting and filters as before they left.
The issue I am having is that the FilterValue property on the columns are set to null and not the value showing on the screen when I am enumerating through the ColumnsCollection. The columns are string values.
Is this a bug or am I approaching this the wrong way?
Yes, this is how we decided to implement this feature. The event argument has new properties that contain the current filter and sort data. Would ship by the end of this week.
Hi, can you please elaborate on persisting DataGrid state (page number, filter and sort order)?
What is the best way to store currently applied filter and restore it after re-initializing the component where RadzenDataGrid is placed?
How I approached this is to save filter (Filters collection property) in centralized state container and in the initial LoadData event I'm restoring the filter by setting FilterValue and FilterOperator for any column that is part of the filter. But this way it seems the applied filter can't be cleared by the Clear button (filter popup)...
That is the same way that I saved and restored the filter property state. I did not test the clear button on the filter, however if you delete the value in the filter textbox, the filter would be removed.