Borrowing code from this page: https://demos.telerik.com/kendo-ui/grid/persist-state
I added save/load buttons to my grid's toolbar. I'm outputting the data in the console that gets saved and loaded, and they appear to match perfectly, however, when I load the data I've saved, the grid displays no data.
Any idea what I'm doing wrong here?
I added save/load buttons to my grid's toolbar. I'm outputting the data in the console that gets saved and loaded, and they appear to match perfectly, however, when I load the data I've saved, the grid displays no data.
Any idea what I'm doing wrong here?
function LoadPrefs() { var grid = $("#Inspections").data("kendoGrid"); var options = localStorage["kendo-grid-options"]; console.log(JSON.parse(options)); if (options) { grid.setOptions(JSON.parse(options)); }}function SavePrefs() { var grid = $("#Inspections").data("kendoGrid"); var opts = grid.getOptions(); console.log(opts); localStorage["kendo-grid-options"] = kendo.stringify(opts);}