i saw that new kendo grid have built-in implemented filter persistence with localStorage
.
$(function () {
var grid = $("#grid").data("kendoGrid");
$("#save").click(function (e) {
e.preventDefault();
localStorage["kendo-grid-options"] = kendo.stringify(grid.getOptions());
});
$("#load").click(function (e) {
e.preventDefault();
var options = localStorage["kendo-grid-options"];
if (options) {
grid.setOptions(JSON.parse(options));
}
});
});
But is the localStorage
implemented by cookies?
How does it works, when getOptions
and setOptions
are called?