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