Declined
Last Updated: 14 Dec 2022 22:19 by John
Holger
Created on: 23 Nov 2018 07:41
Category: Grid
Type: Feature Request
18
Grid: save/restore columns state

Current behavior
The grid component already has the functionality to resize and reorder columns by the user, but is missing functionality for saving an restoring columns configuration, so that changes done by the user are lost after a page change.

There is the Persist the State article in the "How to section" in the documentation, but the described solution is only applicable when adding grid columns by using *ngFor. When defining columns in the markup, due to extensive usage of templates (kendoGridColumnMenuTemplate, kendoGridFilterMenuTemplate, kendoGridCellTemplate, ..), there is no reasonable solution available.

Expected behavior
Provide methods, similar to the jQuery grid, to save and restore columns configuration. This should at least include the column's order, width and sort.

 

PS: This is not a duplicate of the feature request Add persistent state for grid (and other components). The latter one has been marked as "Completed" but does not include the needed functionality.

13 comments
John
Posted on: 14 Dec 2022 22:19

What you have provided is not a very good solution.

      <kendo-grid-column
        *ngFor="let col of gridSettings.columnsConfig"
        [field]="col.field"
        [title]="col.title"
        [width]="col._width"
        [filter]="col.filter"
        [filterable]="col.filterable"
        [hidden]="col.hidden"
        [format]="col.format"
      >

 

All I need are getOptions and setOptions methods (like in jQuery) to call and save into local storage.  Your solution is too complex and not elegant.  

ADMIN
Dimiter Topalov
Posted on: 30 Jun 2022 08:57

Hello,

Due to the specifics of the Angular framework, we decided that providing an extensive demo based on the already discussed possible approaches and examples is more suitable and flexible than exposing built-in Grid methods for saving and loading some column configuration and data state.

Regards,
Dimiter Topalov
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/.

ADMIN
Dimiter Topalov
Posted on: 28 Jan 2021 11:07

Hi,

As the discussed functionality is a subject to custom implementation, based around handling the Grid events or storing and loading the state upon a custom user action (e.g. button click), providing a built-in state storing/loading feature is still not a part of our immediate plans.

Bob, thank you for providing a detailed step-by-step instructions for implementing the Grid state persistence.

Another helpful resource might be the following custom library, provided by one of our clients:

https://www.telerik.com/forums/grid-state-persistence

Regards,
Dimiter Topalov
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/.

Holger
Posted on: 26 Jan 2021 13:11

Hi Bob,

Thanks for the document, I will have a look into it.

Regards,
Holger

Bob
Posted on: 24 Jan 2021 09:19
@Holger, I said I would help a while ago.  I have attached a zip file with a Word document which should explain the basics.  Sorry but I can't use this wysiwyg editor, it's from the ark and really does Telerik no favours.
Holger
Posted on: 22 Jan 2021 09:21

Hi,

since the updated roadmap states about grid improvements, I again would like to ask about the persistence feature.

Is the any chance that this will become implemented soon?

Regards,
Holger

Holger
Posted on: 06 Mar 2020 08:52

Hi Bob,

Sorry for my late reply.

It would be great if would share your code on the forum, I'm highly interested to have a look on it.

Cheers,
Holger

ADMIN
Svet
Posted on: 31 Jan 2020 14:52

Hi,

The referenced part Expand & Collapse State Persistance relates to providing a functionality that will allow to persist the sate of the currently expanded/collapsed details of a Master Detail Grid.

In case any common knowledge should be shared, then the Kendo UI for Angular forum seems the most suitable place for that. Feel free to open a new discussion there on the specific topic.

Regards,
Svetlin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Bob
Posted on: 27 Jan 2020 11:59

Hi Holger,

I have some code which I can share which persists rows added and deleted and column width using the current persist method.  I need to know from Progress/Telerik how best to do this rather than moving out of the Progress environment into a private email channel.

Cheers,

Bob

Holger
Posted on: 27 Jan 2020 07:15

Hi,

as stated in the roadmap: "Cell Selection, Expand & Collapse State Persistance, and Performance Improvements to the Data Grid"

Will this also introduce the functionality described in this feature request?

Regards,
Holger

ADMIN
Dimiter Topalov
Posted on: 29 Oct 2019 09:25

Hi Augusto,

The discussed feature request for built-in Grid Save/Restore column configuration methods is still not a part of our immediate plans, as we are currently focusing our development efforts on more critical Grid features like the Column virtualization, and the long-waited new dedicated TreeList component.

We are still tracking all feature requests, and periodically re-evaluate the customer demand, and include some items from the Feedback portal in our roadmap.

However, as the documentation article on persisting the Grid state and columns config covers the scenario well, we can still recommend using this approach (alongside custom logic for conditional display of various templates until the feature request for built-in methods gains enough popularity and our management decides to include it in the roadmap.

Thank you for the understanding.

Regards,
Dimiter Topalov
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Augusto
Posted on: 22 Oct 2019 21:54

Hi @Dimiter,

Has been any progress on this?

Or maybe should I still follow the approach you suggested here about using *ngFor together with *ngIf to customize the templates?

Alternatively, you can use the *ngFor column generation (like in the examples), and provide custom logic (*ngIf or *ngSwitch) in the templates markup to determine which cell template should be used, based on some other column property (like for example the column title), i.e. list all possible templates and determine which one will be used via *ngIf/*ngSwitch based on the column title (that will be available for each item in the *ngFor loop).

Thanks.

ADMIN
Dimiter Topalov
Posted on: 30 Nov 2018 06:13
Hello Holger,

Thank you for sharing your request. It is approved and we will update this feedback item further once we have started the development of this feature.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.