DataSource bug

2 posts, 0 answers
  1. Bruno
    Bruno avatar
    9 posts
    Member since:
    Oct 2013

    Posted 10 May 2014 Link to this post

    I don't know if it's a known bug or I'm the only one to realize it, but there is bug when we try to bind or use a DataSource object from a json with one field name called "data".

    To demonstrate the problem, the codes below illustrates:

    //Creating the DataSource
    dataSource = new{
                    transport: {
                        read: {
                            url: "data/weather.json",
                            dataType: "json"

    The JSON file:
            "data": "Monday",
            "highTemperature": 28,
            "lowTemperature": 14,
            "image": "shower"
        }, {
            "data": "Tuesday",
            "highTemperature": 35,
            "lowTemperature": 18,
            "image": "sunny"
        }, {
            "data": "Wednesday",
            "highTemperature": 30,
            "lowTemperature": 16,
            "image": "partly-sunny"

    I intentionally changed the name of the field "day" from the Mobile example to "data".
    The DataSource retrieved there is no data (length = 0). But when the json file is requested by AJAX (GET), the data retrieved is the correct json.

    I used this name "data" because it's a fake cognate in Portuguese. It means "date" in portuguese. Now I changed this name and it's working. I took a lot of time to realize this, so I decided to write this report.  

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 14 May 2014 Link to this post

    Hello Bruno,

    The data keyword is reserved by the Kendo UI Template and this is causing the issue that you are facing. I would suggest you to use the schema.parse function if you data has "data" property inside, so you can correctly using with the Kendo UI Widgets, here is a documentation article about it:

    Kiril Nikolov

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

Back to Top