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

Dynamic data gives e.slice is not a function error

1 Answer 978 Views
TreeMap
This is a migrated thread and some comments may be shown as answers.
Xavier
Top achievements
Rank 1
Xavier asked on 11 Aug 2015, 12:19 AM

The following examples fails to run

http://dojo.telerik.com/UXOyu/2

when I add children to items using push.

 If I use a static object like

            data: [{
                name: "Tree",
                value: 5,
              items:[
                {
                  name:"Leaf 1"
                  value:3
                },
                {
                  name:"Leaf 2"
                  value:2
                }
                ]
            }],

 It works fine.

What am I missing?

 

Thanks.

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Popov
Telerik team
answered on 12 Aug 2015, 11:59 AM
Hi,

This happens because the data should be an array instead of an object. Here is an updated example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeMap
Asked by
Xavier
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or