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

Local datastore strange behavior

0 Answers 72 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 15 May 2012, 12:53 PM
Hi All.

I trying to create a local data store like this (this is an official example from docs)
var movies = [ {
      title: "Star Wars: A New Hope",
      year: 1977
   }, {
     title: "Star Wars: The Empire Strikes Back",
     year: 1980
   }, {
     title: "Star Wars: Return of the Jedi",
     year: 1983
   }
];
var localDataSource = new kendo.data.DataSource({data: movies});

But i cannot get a data from the datasource:
localDataSource.data(); // returns "[]"

DataSource data size: 
localDataSource.total(); // returns "0"

Where I am wrong?


No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Oleg
Top achievements
Rank 1
Share this question
or