<script>var dataSource =newkendo.data.DataSource({transport:{read:{url:"https://demos.telerik.com/service/v2/core/products"}},requestEnd:function(e){var response = e.response;var type = e.type;/* The result can be observed in the DevTools(F12) console of the browser. */console.log(type);// displays "read"/* The result can be observed in the DevTools(F12) console of the browser. */console.log(response.length);// displays "77"}});
dataSource.fetch();</script>
<script>var dataSource =newkendo.data.DataSource({transport:{read:{url:"https://demos.telerik.com/service/v2/core/products"}},requestEnd:function(e){//check the "response" argument to skip the local operationsif(e.type==="read"&& e.response){/* The result can be observed in the DevTools(F12) console of the browser. */console.log("Current request is 'read'.");}}});
dataSource.fetch();</script>
<script>functiondataSource_requestEnd(e){var response = e.response;var type = e.type;/* The result can be observed in the DevTools(F12) console of the browser. */console.log(type);// displays "read"/* The result can be observed in the DevTools(F12) console of the browser. */console.log(response.length);// displays "77"}var dataSource =newkendo.data.DataSource({transport:{read:{url:"https://demos.telerik.com/service/v2/core/products"}}});
dataSource.bind("requestEnd", dataSource_requestEnd);
dataSource.fetch();</script>
The requestEnd event does not hold information regarding any errors that occurred during the request. The error information is available as part of the error event.