Changes setting data yields e.slice error from 2013.3.1324 to 2015.3.111

2 posts, 0 answers
  1. BitShift
    BitShift avatar
    29 posts
    Member since:
    Aug 2014

    Posted 14 Jan Link to this post

    Im working on an existing project that was referencing kendo mvc and associated scripts etc version 2013.3.1324 and have since upgraded to 2015.3.1111

    There a number of grids that use a datasource loaded via Ajax.  The datasource is populated similar to this:

    MyDatasourceVar.data(data)

    Where the data variable is that returned from the ajax request.

    This results in a javascript error (e.slice is not a function)

    If I simply change this code to something like this :  MyDatasourceVar.data = data, the error goes away.

    Looking over the (current) docs for datasource
    http://docs.telerik.com/kendo-ui/api/javascript/data/datasource

    I see mention of using the "data" property, but not a setter method like what has ben used in my project.  Was this a change in some version between the two mentioned?

     

      

     

  2. Nikolay Rusev
    Admin
    Nikolay Rusev avatar
    2284 posts

    Posted 19 Jan Link to this post

    Hello BitShift,

     

    There is only data method for the DataSource. You can use it to get/set data from/to DataSource. When used as a setter the argument must always be an array. If it is not such error might appear.

     

    Regards,
    Nikolay Rusev
    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