Unplanned
Last Updated: 12 Sep 2025 06:44 by ADMIN
Holger
Created on: 26 Aug 2025 12:19
Category: Grid
Type: Bug Report
2
Grid: loadState fails to restore columns state

First of all, thank you for providing the state management feature. For me it's one of the most important features of a grid component.

But unfortunately it fails to restore the columns state. This is because each time a grid component and it's columns are instantiated, new IDs are created for the columns. When loading state the columns are identified by their IDs.

When a column is persisted with e.g. id 'k-grid-column-1' and the grid will be destroyed and re-created, then the new column ID is not identical with the old one. Thus restoring the column's state will fail.

Please have a look to this StackBlitz example: https://stackblitz.com/edit/angular-vauqyshn?file=src%2Fapp%2Fapp.component.ts

A possible workaround is to save also the column's field property and later use it to re-map the saved id to the new id.

A better solution may be to extend the GridColumnComponent with something like a "PersistenceKey" property, which will be used for identifying a column. A directive may also work. Otherwise generating non transient unique ids for the grid columns will also work.

Best regards,
Holger

7 comments
ADMIN
Zornitsa
Posted on: 12 Sep 2025 06:44

Hi Holger,

My name is Zornitsa, and I will be answering you today as my colleague Martin is currently unavailable.

To give an update about the discussed bug's status, I am afraid that it is currently not scheduled for our immediate development plans.

In general, our prioritization process involves multiple factors, including severity level, impact frequency, customer demand, and available development resources. All reported bugs and feature requests go through this evaluation pipeline to ensure we address the most prioritized issues first.

On that note, it is hard for me to provide a specific timeframe for the development of the fix since this also highly depends on the number of other planned tasks and bugs that our developers are currently working on. I know that the information might be disappointing to hear, but this is the reason why we typically refrain from giving exact estimates for bug fixes, as we would not like to make promises that we might not be able to fulfill.

With the above being said, that is why we advise our customers to subscribe to the GitHub issues and receive notifications when there is any progress on the status of the bug. 

I hope the provided information sheds some light on the matter. We sincerely apologize for any inconvenience that the bug might have caused on your side.

Regards,
Zornitsa
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Holger
Posted on: 05 Sep 2025 08:28

Hello Martin,

It's clear that this issue is unplanned for now. But without a fix the the "loadState" feature is completely useless.

Do you have an estimation when we can expect this to be fixed?

Regards,
Holger

ADMIN
Martin Bechev
Posted on: 05 Sep 2025 08:04

Hello Holger,

Thank you for the provided additional details for this case.

All bug reports for the Kendo Angular suite are tracked in this GitHub repository. The found bug report is still valid, and currently, it's not being added to our immediate development plans. 

Once the issue is fixed, we will update the status of this report as well.

Please accept our apologies for the inconvenience caused.

Regards,
Martin Bechev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Holger
Posted on: 03 Sep 2025 11:01

Same behavior as described here: https://github.com/telerik/kendo-angular/issues/4651

 

Holger
Posted on: 03 Sep 2025 10:56

Additional information:

This is how the IDs are genrated

The columnId variable is shared with all grid instances during the whole lifetime of the application.

Holger
Posted on: 03 Sep 2025 05:39

Hello Martin,

I have updated the example to demonstrate the problem more precisely.

https://stackblitz.com/edit/angular-vauqyshn?file=src%2Fapp%2Fapp.component.ts

Here are the steps to reproduce the problem:

#1 Log grid columns

#2 Hide a grid column and log grid columns

#3 Save state

#4 Hide and show the grid

#5 Log grid columns


New IDs are generated. Originally IDs were [0, 1], new IDs are [2, 3]

#6 Load state

#7 Columns (hidden column) are not restored

 

Look at this excerpt from from the GridComponent's source code. When loading state, columns are identified by their IDs.

I hope this clarifies the problem.

Regards,
Holger

ADMIN
Martin Bechev
Posted on: 02 Sep 2025 07:50

Hello Holger,

We are glad to hear the state persistence of the Grid was found helpful.

The state of the Grid columns (their order, width, visibility, sticky, and locked state) is persisted by default in both [data] binding and kendoGridBinding directive (auto state persistence).

https://www.telerik.com/kendo-angular-ui/components/grixd/persist-state#saving-the-grid-state

I saw the demo and the changed ID, but the built-in state persistence of the Grid mainly relies on the currentState field (which holds the information about the columns - columnState) loadState method, and gridStateChange event (which is emitted each time when the Grid state is changed).

State persistence in the Grid does not require accessing internal column properties rendered in the DOM. Based on the information provided, it’s unclear what customizations have been applied to the Grid or why the built-in state persistence logic isn’t sufficient. To proceed, we need more details about the current request: why the existing solution does not meet the requirements, and how the Grid would benefit from the proposed change. Thank you in advance.

Regards,
Martin Bechev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.