Restoring FluentDataGrid state from session. #2008
Unanswered
marciolordelo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a page with a FluentDataGrid using ItemsProvide callback to fetch the data. I am storing in the session a JSON containing the values from the last GridItemsProviderRequest (SortBy column name, column SortDirection, and count), the current page of the pagination component. and other filters.
The idea is to get the last GridItemsProviderRequest values from the session when the user navigates back to the page, restoring the grid state (including sorted column, direction, current page, and other filters). I'm referencing the grid in code-behind (using the @ref property) and would like to set the sort by column, and direction. Still, I don't have access to the _sortByColumn and _sortByAscending from the FluentDataGrid.
Is there a way to use the reference object to set those values so that when the ItemProvider callback is called the GridItemsProviderRequest will have all the values restored from the session?
I would also appreciate any help on how to restore the last FluentDataGrid state from the session (I am using a browser session).
ItemsProvide callback:
Beta Was this translation helpful? Give feedback.
All reactions