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

Array of DataSource versus HierarchicalDataSource

3 Answers 145 Views
Hierarchical Data Source
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 2
Iron
Jack asked on 20 Jun 2013, 08:18 AM
Assuming your data only has two levels of depth, in which case would you favor an array of (objects containing a) DataSource versus a HierarchicalDataSource and vice versa?

In such a case, we are tempted to use option 1 because the DataSource is much better documented and easy to grasp than the HierarchicalDataSource but the HierachicalDataSource might have hidden benefits worth the learning curve.

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 24 Jun 2013, 07:22 AM
Hello Jack,

Thank you for getting in touch with us.
You should have in mind that currently the HierarchicalDataSource works only with the TreeView widget. Other Kendo UI widgets such as Grid are not compatible with it. That said, which kind of DataSource is suitable for your case depends on the specifications of your scenario.

Could you please explain in details how do you plan to present the data? What dataSource/widget features you will need (for example - editing, sorting, etc)?

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jack
Top achievements
Rank 2
Iron
answered on 24 Jun 2013, 12:42 PM
Hi Alexander,
 
In this instance, I am building custom widgets based on the kendo UI framework.

My data is a document constituted of pages and each page has content items (rectangles located at x, y on the page).

I am considering two options for my view model:
  1. a hierarchical datasource;
  2. an array of tabular datasources (each page is a dataSource of content items). 

I have two widgets:

  1.  A navigation widget on the left  listing pages like in Acrobat or Powerpoint
  2.  A page editor widget

Best regards,
Jack

0
Alexander Valchev
Telerik team
answered on 26 Jun 2013, 09:10 AM
Hi Jack,

Thank you for the additional info.
You are developing custom widgets so whether to use the standard DataSource or a HierarchicalDataSource depends entirely on your preferences and logic.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Hierarchical Data Source
Asked by
Jack
Top achievements
Rank 2
Iron
Answers by
Alexander Valchev
Telerik team
Jack
Top achievements
Rank 2
Iron
Share this question
or