The grid state i.e., column widths, column order, filtered columns, sorted columns, paging state, groupModel, etc
can be saved in
- browser local storage
- or remotely in a database.
It can be saved by
- click of a button
- automtically when grid is destroyed.
- automtically when browser window is closed.
The state can be restored when
- automatically when grid is initialized by calling
loadState() in create event.
- after grid is created e.g., upon click of a button
Type of state:
The amount and type of state can be precisely controlled by new configuration options
stateKeys and stateColKeys
In this example we also save individual close/open state of every node using stateKeys to add
groupModel.nodeClose property in the state.