Edit this page

transport Object

The configuration used to load and save the data items. A data source is remote or local based on the way it retrieves data items.

Remote data sources load and save data items from and to a remote end-point (also known as remote service or server). The transport option describes the remote service configuration - URL, HTTP verb, HTTP headers, and others. The transport option can also be used to implement custom data loading and saving.

Local data sources are bound to a JavaScript array via the data option.

Example - specify the remote service configuration

<script>
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 products = dataSource.data();
  console.log(products[0].ProductName); // displays "Chai"
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy