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

[Solved] DataSource request error won't fire!

1 Answer 240 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Ioan
Top achievements
Rank 1
Ioan asked on 18 Sep 2014, 12:52 PM
I'm using a DataSource for a Mobile List View with serverPaging, serverFiltering, endlessScroll.
The problem is the DataSource won't fire if there's an error with the request.
I tried using config DataSource.error =function(e){console.log(e);} and DataSource.requestEnd(e){console.log(e)}
None of them are fired when the DataSource encounters a read error. 
The weird thing is requestEnd fires everytime (read or update) in another DataSource instance which doesn't use serverPaging, serverFiltering etc.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 22 Sep 2014, 06:58 AM
Hi Ioan,

The dataSource error event is the actual $.ajax() error event handler. I am not really sure what is the DataSource.error = function() configuration, but the error is an event, so you need to either use it as part of the config options, or use the bind() method to bind a callback function after the initialization. Please check the following documentation article for more information:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#events-error

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Data Source
Asked by
Ioan
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or