How to save tilelayout and reload this in later

4 posts, 0 answers
  1. duy
    duy avatar
    10 posts
    Member since:
    Feb 2019

    Posted 17 Aug Link to this post

    Hi !

    I using telerik jquery , when i using tilelayout, i like action as : Drag, drop. 

     

    But I want to save layout and reload it in later.

     

    Please help me to do it !

     

    tks !

  2. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 19 Aug Link to this post

    Hello Duy,

    It is possible to save the TileLayout state to the local storage via getOptions and setOptions methods

    //save the options
    var options = $("#tilelayout").getKendoTileLayout().getOptions();
    var stringOptions = JSON.stringify(options);
    localStorage["kendo-tilelayout-options"] = stringOptions;
    ...
    //  load the options
    var options = localStorage["kendo-tilelayout-options"];
     if (options) {
          var deserializedOptions = JSON.parse(options, Function.deserialise);
          var layout = $("#tilelayout").getKendoTileLayout();
          layout.setOptions(deserializedOptions);
    }

    The above can be examined live in the following Dojo demo:

    Let me know if you have any questions.

    Regards,
    Nikolay
    Progress Telerik

  3. duy
    duy avatar
    10 posts
    Member since:
    Feb 2019

    Posted 19 Aug in reply to Nikolay Link to this post

    Oh. many thanks Nikolay !

     

    This is correctly i find. But can you show me the documentation reference to do it.

    I have read the document carefully but cannot find it.

    Thanks you verry much !

  4. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 21 Aug Link to this post

    Hi Duy,

    You are most welcome. 

    Unfortunately, this is not present in the documentation, however, I will ensure it gets included as it is quite a valuable resource. Thank you for pointing it out.

    Please contact us back if anything new arises.

    Regards,
    Nikolay
    Progress Telerik

    Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Back to Top