New to Kendo UI for jQueryStart a free 30-day trial

Fetch

methods

Reads the data items from a remote service (if the transport option is set) or from a JavaScript array (if the data option is set).

The fetch method makes a request to the remote service only the first time it is called if the dataSource is not configured for server operations.

Returns:Promise

—A promise that will be resolved when the data has been loaded, or rejected if an HTTP error occurs.

<div id="grid"></div>

<script>
	var dataSource = new kendo.data.DataSource({
	  transport: {
	    read:  {
        url: "https://demos.telerik.com/service/v2/core/products"
	    }
	  }
	});

  dataSource.fetch(function() {
    let data = this.data();

    // initialize a Kendo Grid with the returned data from the server.
    $("#grid").kendoGrid({
      dataSource: {
        data: data
      },
      height: 800
    });
  });
</script>
<div id="grid"></div>
  
<script>
	var dataSource = new kendo.data.DataSource({
	  transport: {
	    read:  {
        url: "https://demos.telerik.com/service/v2/core/products"
	    }
	  }
	});
	dataSource.fetch().then(function(){
  	var data = dataSource.data();

    // initialize a Kendo Grid with the returned data from the server.
    $("#grid").kendoGrid({
      dataSource: {
        data: data
      },
      height: 800
    });
	});
</script>
Not finding the help you need?
Contact Support