This is a migrated thread and some comments may be shown as answers.

Grid sorting state lost when using tabs

2 Answers 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Veteran
Doug asked on 02 Dec 2020, 06:32 PM

I am using a telerik tab control with a grid in one tab.  If you sort, filter, or page the grid; the state will be lost if you click into a tab and then back to the tab with the grid.  What's the proper way to save this state?

 

Thanks - Doug

2 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 03 Dec 2020, 07:13 AM

Hi Doug,

The following demo showcases how you can persist the grid state: https://demos.telerik.com/blazor-ui/grid/persist-state. You can read more about it in the documentation to see more details on what you can do with the state: https://docs.telerik.com/blazor-ui/components/grid/state. For example, storing the state in OnStateChanged can let you restore it later easily.

You may also want to Follow this feature request for a feature in the tab strip that would let you avoid re-initializing components inside: https://feedback.telerik.com/blazor/1431932-tabs-can-hide-with-css-only-to-avoid-re-initializing. I've added your Vote for it on your behalf to raise its priority, and you can click the Follow button for status update emails.

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Doug
Top achievements
Rank 1
Veteran
answered on 03 Dec 2020, 03:41 PM
Thanks.  That feature request is exactly what I am looking for.  I use tabs for similarly, where the first tab is a grid of records.  Subsequent tabs or detail of the records and their related records.
Tags
Grid
Asked by
Doug
Top achievements
Rank 1
Veteran
Answers by
Marin Bratanov
Telerik team
Doug
Top achievements
Rank 1
Veteran
Share this question
or