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

Grid state persistence - Part 2

1 Answer 93 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Lynden
Top achievements
Rank 1
Lynden asked on 03 Jun 2020, 02:11 AM

Ok the first pass at making state management less of an overhead was leaving a lot of boiler plate code required to be implemented per grid. The biggest pains were having to create an array of columns for each grid, this gets old quick when you have a project with many grids.

So I have decided to implemented state management in a directive and are fairly happy with the results.

Features:

  • State persistence is managed entirely in the directive.
  • State storage can be session or local defaults to session.
  • Persists expanded rows.
  • Persists column visibility.
  • Persists column resize.
  • Persists column reorder.
  • Persists grid sort, page, page size, group, filter etc..

Just add the directive and handle the stateReady event. You can read more here.

Github: https://github.com/lucasheight/angular-kendo-grid-state
NpmJs: https://www.npmjs.com/package/@lucasheight/kendo-grid-state

 Stackblitz: https://stackblitz.com/edit/angular-kendo-grid-state-directive

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 04 Jun 2020, 08:41 AM

Hi Lynden,

That is a great project. Thank you for sharing your work with the community indeed. The implemented approach and the provided package does seem to be able to help others. I have further updated your account Telerik points as a symbol of gratitude for your continues contributions to the community.

Regards,
Svetlin
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
Lynden
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or