Children of DataItem

2 posts, 0 answers
  1. jan
    jan avatar
    1 posts
    Member since:
    Dec 2008

    Posted 20 Jun 2013 Link to this post

    I have a static HierarchicalDataSource defined in a file. I use it as source for a TreeView. TreeView has an 'expand' event fired before expand actually occurs. In that event I can get dataItem related to the node that is being expanded. I need to get children of that dataItem but I cannot see any method/property on dataItem that would allow me to get them. Is there any way to get/load child items?

    I would be most grateful for any help :)
  2. Daniel
    Daniel avatar
    2110 posts

    Posted 24 Jun 2013 Link to this post


    You can use the node children field to access the item child dataSource and its items e.g.

    function expand(e) {
        var dataItem = this.dataItem(e.node);
        if (dataItem.hasChildren) {
            var childItems =;
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top