convert a normal kendo datasource to HierarchicalDataSource

2 posts, 0 answers
  1. Kalli Kaldi
    Kalli Kaldi avatar
    27 posts
    Member since:
    Oct 2011

    Posted 24 May Link to this post

    hello there

    is there a way to convert a normal kendo DataSource to a HierarchicalDataSource

    I´m trying to create a function that gets all the child elements from the datasource but it´s hard when there is grouping involved in the datasource


    or do you have some kind of function that gets all the lowest child nodes that are in the normal datasource


    best regards from Iceland

  2. Nikolay Rusev
    Nikolay Rusev avatar
    2276 posts

    Posted 26 May Link to this post

    Hello Kalli Kaldi,

    There isn't one-to-one conversion from one type of DataSource to another. The data source should be instantiated as such in first place.

    However you could implement a recursive function which to iterate over the view items. When grouping is applied the items will be in shape as in this article.

    Nikolay Rusev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top