Nested listviews

2 posts, 0 answers
  1. Dennis
    Dennis avatar
    24 posts
    Member since:
    Oct 2012

    Posted 12 Jan 2013 Link to this post

    There is one very real scenario that I often encounter and I'm not sure how to approach it with Kendo.

    I have a Datasource that has a complex structure, meaning there are nested complex structures, sometimes going 2 levels. Right now I use a regular data source, and display it with a kendo template. When i do chenges i have to "repaint" the template, since the painted template doesnt seem to notice changes in the underlying MVVM bound item. When i reach the nested elements in the template i use javascript for loops to show them all.

    It would be nicer to use a nested type of listview or something, but I'm not sure if it's possible or how to achive it?

    I'm also not sure if an hierarchical datasource is applyable since from what I understood that should be used when I have to connect more than one API service call, and I do not have that case. I find the hierarchical datasource documentation lacking, and am not sure of all the scenarios where to use it from it. It would be nice if I could define a model and nest another model inside it. Is that possible?
  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 15 Jan 2013 Link to this post

    Hi Dennis,

    Kendo DataSource does not support nested data structures. Hierarchical DataSource is not compatible with ListView widget, it is designed to work with the TreeView.

    Could you please provide more details about your scenario and if possible a simplified example that demonstrates your current implementation (probably in jsBin/jsFiddle)? Generally speaking Kendo MVVM works with nested data so probably I would be able to suggest a MVVM solution with source and template binding, but I am not sure which of the ListView functionality you use. For example the MVVM does not offer CRUD operations and remote transport out of the box.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top