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

Problem with grid in tab

1 Answer 237 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 20 May 2020, 06:24 AM

Hello,

I have a display that contains a tab control with two tabs and each tab containing a grid.

The problem is that, when I switch tab, the sorting and filtering of the grid is lost.

1 Answer, 1 is accepted

Sort by
1
Marin Bratanov
Telerik team
answered on 20 May 2020, 06:34 AM

Hello Patrick,

The tab strip renders only the currently active tab. This means that all other tabs are disposed - this is the true blazor way and it improves performance.

This also means that if you want to maintain the state of components in those tabs, you should keep that state somewhere (e.g., in the component thathosts the tab strip). The grid offers a state feature that can let you do that easily through a simple in-memory variable in the parent component: https://docs.telerik.com/blazor-ui/components/grid/state.

You may also find interesting this feature request and if so - add your Vote for it and Follow it: https://feedback.telerik.com/blazor/1431932-tabs-can-hide-with-css-only-to-avoid-re-initializing

 

Regards,
Marin Bratanov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Grid
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or