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

Binding json data to grid

3 Answers 328 Views
Grid
This is a migrated thread and some comments may be shown as answers.
MRa
Top achievements
Rank 1
MRa asked on 14 Dec 2012, 10:15 PM

This is my first time using Kendo UI and I'm trying to set up a simple grid with data fed from a json file.

When the page loads, it doesn't display anything and it does not give me any type of error, am i doing anything wrong?

var Data = new kendo.data.DataSource({
          transport: {
              read: {
                  url: "http://localhost:88/Animation.svc/GetProspect",
                  dataType: "json"
              }
          },

      });

      $("#grid").kendoGrid({
          dataSource: Data,
          columns: [
    {
        field: "Date",
        title: "Date"
    },
    {
        field: "Name",
        title: "Name"

    }],
     height: 200,
    scrollable: true,
    pageable: true,
    sortable: {
    mode: "multiple"
    }
      });

This is what the json format looks like:
[{"Date":"12-31-2010","Name":"A","LastName":"B"}, {"Date":"12-31-2011","Name":"B","LastName":"C"}]

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 18 Dec 2012, 11:23 AM
Hi Mery,

 
Basically current approach looks valid and everything is working as expected on our side (please check this screencast). Please provide run-able project where the issue is reproduced  - hopefully this will help us pinpoint the exact reason for this behavior.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
MRa
Top achievements
Rank 1
answered on 18 Dec 2012, 02:55 PM
Hi Vladimir,

Thank you for the reply, It works fine now in Chrome, is there a reason why the data is not displaying in ie9?
0
Vladimir Iliev
Telerik team
answered on 20 Dec 2012, 09:35 AM
Hi Mery,

 
Most probably there is JavaScript error on the page, but from the provided information it's not clear for us what exactly is the reason for this behavior and I would like once again to ask you to provide a run-able project that reproduces the problem. Without it, we could only guess what the reason is and as you can see this approach doesn't work and we are getting out of ideas.

Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
MRa
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
MRa
Top achievements
Rank 1
Share this question
or