This is a migrated thread and some comments may be shown as answers.

convert a normal kendo datasource to HierarchicalDataSource

1 Answer 49 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Kalli Kaldi
Top achievements
Rank 1
Kalli Kaldi asked on 24 May 2016, 04:33 PM

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

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 26 May 2016, 06:56 AM

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.

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Data Source
Asked by
Kalli Kaldi
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or