New to Kendo UI for jQuery? Download free 30-day trial

jQuery TreeList Persist State

Loading Demo...
  • EXAMPLE
  • VIEW SOURCE
persist-state.html
Sample service

Also available for:

API REFERENCE

Description

The Kendo UI for jQuery TreeList component supports the ability to store settings and restore them later.

The Kendo UI for jQuery TreeList enables you to store the custom settings of the user and restore them when the user logs back in at some future moment. This feature is known as state persistence and is availabe through the getOptions and the setOptions methods.

The current example shows how to save the TreeList setting in the localStorage and restore them on button clicks.

This TreeList example is part of a unique collection of hundreds of jQuery demos, with which you can see all Kendo UI for jQuery components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Kendo UI for jQuery Dojo or ThemeBuilder.

Description

A common scenario is to save the user's preferences and settings when interacting with your application. These preferences should be restored once the user logs back in at any point in the future.

Kendo UI TreeList enables you to save the applied user preferences by using the getOptions method and then restore them using the setOptions method. These methods allow you to serialize TreeList's current state when needed and recover it later on.

In this particular example, we use the localStorage of the browser to save and load the TreeList widget's settings.

Further information on the setOptions and getOptions methods is available in the TreeList API section.

Support & Learning Resources

Additional Resources