Dynamic data gives e.slice is not a function error

2 posts, 1 answers
  1. Xavier
    Xavier avatar
    29 posts
    Member since:
    Jun 2014

    Posted 10 Aug 2015 Link to this post

    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.

     

     

     

     

  2. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 12 Aug 2015 Link to this post

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