Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

kendo datasource get

var dataSource = new kendo.data.DataSource({
  transport: {
    read:  {
      url: "https://demos.telerik.com/kendo-ui/service/products",
      dataType: "jsonp" // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
    }
  }
});
dataSource.fetch(function(){
  var data = dataSource.data();
  console.log(data.length);  // displays "77"
  console.log(data[0].ProductName); // displays "Chai"
});
 
PREVIOUS NEXT
Tagged: #kendo #datasource
ADD COMMENT
Topic
Name
3+8 =