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

Why am I getting the 'invalid slice method' error?

2 Answers 397 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 27 Nov 2018, 12:38 PM

I'm pulling my hair out with the the 'slice' error on something that looks so simple, using the code below

var dataSource = new kendo.data.DataSource({
    transport: {
        read: {
            url: "helper.php?action=data",
            dataType: "json"
        }
    },
    schema: {
        data: "zzz"
    }
});
 
dataSource.bind("error", function(e) {
    alert('error');
});
     
dataSource.fetch(function() {
    alert('fetch complete');
});

and my helper returns this json:

{"zzz":{"items":[{"type":"button","text":"Test"}]}}

 

I have tried with and without the schema set - please help?

2 Answers, 1 is accepted

Sort by
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 28 Nov 2018, 09:48 AM
Due to the fact that I can't edit or delete posts on this forum I have reposted this with a more descriptive subject and addtional detail
0
Marin Bratanov
Telerik team
answered on 28 Nov 2018, 12:04 PM
Hi Al,

You can find my answer in the other thread: https://www.telerik.com/forums/'invalid-slice-method'-error-in-kendo-all-js#UkOibYXBRUGSOXJAwwPuNA.

On a side note, you can always add a post with the new information to the old thread, it's not necessary to open a new one.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Data Source
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Marin Bratanov
Telerik team
Share this question
or