Loading & Saving Hidden Columns

We are trying to provide following functionality:
– User should be able to hide columns from Grid by right clicking on header and choosing headers from the menu.
– This state should be maintained even when user relaunches the browser. Currently, it stays as it is till the time we don’t close the browser.

For the above, we have written following three lines:

  1. myGrid.enableHeaderMenu();
  2. myGrid.enableAutoHiddenColumnsSaving(“Grid_GUID”);
  3. myGrid.loadHiddenColumnsFromCookie(“Grid_GUID”);

These lines are written after grid initialization and before grid loading. Is there something missing?

Thanks.

Your code should work well.

If the problem still occurs for you please, provide with a complete demo, where the issue can be reconstructed.

Attached is a demo where issue can be seen. Could you please let us know if we missed something?

Please, try to set the expire period for the cookie:
Grid0.enableAutoHiddenColumnsSaving("{CBC1C65B-E94D-4DBE-B726-9924987EE7F9}", “expires=Fri,25-Dec-2099 23:59:59 GMT”);
Grid0.loadHiddenColumnsFromCookie("{CBC1C65B-E94D-4DBE-B726-9924987EE7F9}");

Thanks it worked.