Array of DataSource versus HierarchicalDataSource

4 posts, 0 answers
  1. Jack
    Jack avatar
    100 posts
    Member since:
    Jan 2007

    Posted 20 Jun 2013 Link to this post

    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.
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 24 Jun 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Jack
    Jack avatar
    100 posts
    Member since:
    Jan 2007

    Posted 24 Jun 2013 Link to this post

    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

  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 26 Jun 2013 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready