Make last child node as anchor tag for all the parent nodes

2 posts, 1 answers
  1. Yatish
    Yatish avatar
    5 posts
    Member since:
    Apr 2016

    Posted 02 Jun Link to this post

    Hi,

    I am working with the treeview with angularjs template shown on the telerik treeview demo and looking for the following format.

    A

       1

          1.1

       2

          2.1

                2.1.1

    Is there a way to make only the '1.1' and '2.1.1' (the last child nodes on the respective parents)as anchor tags. I tried to use the k-template and define anchor tag on the template and it is causing all the nodes render as anchor tags.

    -YK

         

  2. Answer
    Daniel
    Admin
    Daniel avatar
    2117 posts

    Posted 06 Jun Link to this post

    Hello,

    I replied to the support ticket. For convenience I am pasting my reply below:


    Should all leaf nodes be made anchors or just the last leaf node? It is not clear from the example. In the first case you can use the hasChildren field (and if needed the level method to determine) if the node is leaf. In case you need to make only the last leaf then you should also check the index of the item in the parent data. I created an example that demonstrates both cases.

    Regards,
    Daniel
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top