A configuration object specifying options related to state storing.
At runtime, end-users may adjust pivot grid settings to their needs. By default, these settings disappear when the pivot grid disposes (for example, on page reload) and the pivot grid appears in its original configuration. If user settings need to be saved and then restored, enable client-side state storing for the grid by setting the stateStoring | enabled option to true. The pivot grid state will be saved under a specified storage key. The saving operation is conducted after a certain amount of time has passed since the last change of the state. To specify the amount of time in milliseconds, use the savingTimeout option.
PivotGrid supports various types of state storing. The type of storage that will suit your needs best depends on the supposed lifetime of user-specified pivot grid settings. For more information about state storing types, refer to the type option description.
The PivotGridDataSource provides the state method. Use it to get or change the pivot grid state at runtime. Call this method without arguments to obtain the pivot grid state. When you need to set the pivot grid state, call this method with the state object as its argument. You can also return the widget to its default state by calling the state method with the empty object or null argument.
Specifies a callback function that performs specific actions on state loading.
If you chose the custom state storing type, use the functions assigned to the customSave and customLoad options for handling state changes. The function assigned to the customLoad option is called when a state is restored. This function should return an object representing a pivot grid state. Normally, it is the object saved within the customSave function.
Specifies a callback function that performs specific actions on state saving.
If you chose the custom state storing type, use the functions assigned to the customSave and customLoad options for handling state changes. The function assigned to the customSave option is called every time a pivot grid state is changed. You can access the currently changed pivot grid state using the function's first parameter. The state is represented by an opaque data object.
Specifies whether or not a grid saves its state.
Specifies the delay between the last change of a grid state and the operation of saving this state in milliseconds.
When using the PivotGrid widget, a number of settings may be changed at runtime. When these changes are being made one after another, there is no need to save the grid state after each change. Instead, specify the savingTimeout option, which dictates how much time should pass between the last change of the state and the operation of saving this state.
Specifies a unique key to be used for storing the grid state.
Specifies the type of storage to be used for state storing.
When state storing is enabled, PivotGrid stores data about its state on the client side. The type of storage that will suit your needs best depends on the supposed lifetime of user-specified pivot grid settings, such as fiends configuration, sorting, filters, expanded headers, etc. If these settings should be destroyed after a browser session ends, use a session storage. If it is important to keep them for a longer time, choose a local storage.