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

Why does the schema.errors field not work?

4 Answers 163 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 01 Mar 2013, 07:36 PM
According to the documentation at http://docs.kendoui.com/api/framework/datasource, there is an errors field you can specify in the schema of a datasource, and, if the field is present in the response, the error handler will be called.  This does not work.  In the below example, i have a books.xml document as follows:

<books>
<error>something</error>
<book>
<title>booktitle</title>
</book>
<books>

And the code that uses it is below.  It shows the book in the grid, but i also expect to get an alert.  no alert happens, so something must be broken with this?

$(document).ready(function() {
   $("#grid").kendoGrid({
      dataSource:  new kendo.data.DataSource({
error: function(e) {
   alert(1);
},
transport: {
   read: "books.xml"
},
schema: {
   type: "xml",
   errors: "/books/error",
   data: "/books/book",
   model: {
      fields: {
 title: "title/text()"
      }
   }
}
      })
   });
});

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 04 Mar 2013, 12:53 PM
Hello Ryan,

We were able to observe the issue you have described and to address it. The fix will be included in the next internal build. Meanwhile, I have updated your telerik points.

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Craig
Top achievements
Rank 1
answered on 11 Mar 2013, 11:50 PM
Is there a workaround to get this working in the meantime?
Or, is there a build available with this fix yet?
0
Rosen
Telerik team
answered on 12 Mar 2013, 07:18 AM
Hello Craig,

The fix will be available in the official Q1 2013 release of KendoUI, which is scheduled for the second half of March.

All the best,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bilal
Top achievements
Rank 2
answered on 26 Feb 2015, 10:07 PM
Hi Rosen,
I am using latest build of Kendo and still experiencing the same problem mentioned here in this post! The error event is not firing. Here is a more detailed post: 
http://www.telerik.com/forums/datasource-error-event-is-not-firing

Thanks
Tags
Data Source
Asked by
Ryan
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Craig
Top achievements
Rank 1
Bilal
Top achievements
Rank 2
Share this question
or