How add/remove item dynamic in Tilelayout ~

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

    Posted 20 Aug Link to this post

    Hi !

     

    I'm using Kendo TileLayout in Jquery. When I create Tilelayout.

     

    I want add or remove item dynamic at runtime, but I don't find way to do it.

     

    Please help me do it

     

    Many thanks !

  2. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 24 Aug Link to this post

    Hi Duy,

    Thank you for sharing the use-case you are having.

    At this point, dynamically adding/removing containers in the TileLayout is not supported. However, it has been requested and I encourage you to cast your vote for the feature request in our feedback portal below:

    We monitor the requests regularly and prioritize those with a high number of votes and the potential impact the respective feature will bring.

    Regards,
    Nikolay
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

  3. Hung
    Hung avatar
    15 posts
    Member since:
    Sep 2017

    Posted 31 Aug in reply to Nikolay Link to this post

    If we can not add/remove, is there a why we can hide/show a container?
  4. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 02 Sep Link to this post

    Hello Duy,

    I could suggest finding the desired element with jQuery and setting its display CSS property to "none", for example:

    $("#tilelayout").find(".k-tilelayout-item:first-child").css("display", "none");

    You can check the following Dojo I have prepared demonstrating the above:

    Let me know if you have any questions.

    Regards,
    Nikolay
    Progress Telerik

    Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

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

    Posted 02 Sep in reply to Hung Link to this post

    you know "dynamic" ?????

    i don't like create 100 items if i need 50 items or 20 items or 10 items.

    How many items to enough at runtime ????
  6. Hung
    Hung avatar
    15 posts
    Member since:
    Sep 2017

    Posted 03 Sep in reply to Nikolay Link to this post

    Nikolay, 

    you can find first and last child and turn display on/off, how do I find a child using index like child 3 or child 4?

    thanks.

     

    $("#tilelayout").find(".k-tilelayout-item:first-child").css("display", "none");

     $("#tilelayout").find(".k-tilelayout-item:last-child").css("display", "none");

     

  7. Nikolay
    Admin
    Nikolay  avatar
    222 posts

    Posted 04 Sep Link to this post

    Hi Duy,

    The items can be located via id and respectively set hidden with jQuery:

    var item = $("#tilelayout").find("#" +$("#tilelayout").getKendoTileLayout().items[1].id) //1 is the id of the container
    $(item).css("display", "none");

    Please check the following Dojo out:

    Let me know if you have any questions.

    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