We are modifying the following project to try Grouped Headers in the Grid control.
grid-5.1.1-trial\examples\frameworks\vue\javascript\export-excel\src
We are using state save to save column change settings like reordering of columns, width, hide and show
For columns it is rendering the state but any column changes for sub headers of the grouped header, the state is not rendered.
Sharing the code:
We are adding this block to the existing code in listeners block:
listeners: {
columnDrop: function ({ source }) {
console.log("DragDrop triggeres", source.state)
localStorage.setItem('docs-grid-state', JSON.stringify(grid.state));
},
paint: function () {
const state = JSON.parse(localStorage.getItem('docs-grid-state'));
if (state) grid.state = state;
},
}
The following is the listeners block for the Columns:
listeners: {
columnDrop: function ({ source })
{
localStorage.setItem('docs-grid-state', JSON.stringify(grid.state));
},
paint: function () {
const state = JSON.parse(localStorage.getItem('docs-grid-state'));
if (state)
grid.state = state;
},
}
Please advise.