Save and restore using cookie problem

I have a problem when saving column widths with the enableAutoSizeSaving().

If the grid had 12 columns when used the first time. And later the column count is changed, there is a javascript error. And I can’t seem to get out of the error loop without the user clearing his cookies. Is there a workaround or fix?


Please try to use attached js file instead of original one, it has base checks, so it will ignore old sizes|orders if count of column was changed. (1.67 KB)