Persist specific grid state (column width), ignore others (sort, page, ...)
1 Answer 5 Views
Top achievements
Rank 1
Stefan asked on 10 May 2021, 02:05 PM


we want to persist the width of resizable columns, only.

We are aware of this article ( and the getOptions() and setOptions() functions, but these get/set other options like sort and page.

We only want to persist the column width. Is there a supported way of doing this?

Kind regards.

1 Answer, 1 is accepted

Sort by
Georgi Denchev
Telerik team
answered on 11 May 2021, 12:19 PM

Hello, Stefan,

You can set only the columns using the setOptions method:

            $("#load").click(function (e) {
                // Retrieve the options.
                var options = localStorage["kendo-grid-options"];
                if (options) {
                    // Parse the retrieved options.
                    let parsedOptions = JSON.parse(options);
                    // Get only the columns from the options.
                    let columns = parsedOptions.columns;
                    // Change only the columns options. You can use the same approach for other settings as well.
                    grid.setOptions({columns: columns});

Best Regards,
Georgi Denchev
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place:

Asked by
Top achievements
Rank 1
Answers by
Georgi Denchev
Telerik team
Share this question