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

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

1 Answer 18 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
BitShift
Top achievements
Rank 1
Veteran
BitShift asked on 14 Jan 2016, 04:36 PM

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?

 

  

 

1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 19 Jan 2016, 08:16 AM

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!
 
Tags
Data Source
Asked by
BitShift
Top achievements
Rank 1
Veteran
Answers by
Nikolay Rusev
Telerik team
Share this question
or