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

Cant get my data loaded into the grid

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 2
Jay asked on 06 Jan 2012, 02:06 AM
I have an aspx page which returns the following data:


{
  "TASKS": [
    {
      "TASK_ID": 101153,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 1",
      "PRIORITY": "Unassigned"
    },
    {
      "TASK_ID": 101159,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 2",
      "PRIORITY": "Unassigned"
    },
    {
      "TASK_ID": 101091,
      "TASK_TYPE": "Ticket",
      "TITLE": "This is not working 3",
 "PRIORITY": "Unassigned"
    }]
}

The content type is "application/json", yet no matter what I do, I can not get the grid to load this data.  Can someone help?

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 06 Jan 2012, 10:44 AM
Hi,

 How is your grid configured? You need to tell the data source what your JSON format is:

dataSource: {
    schema: {
          data: "TASKS" // this tells the DataSource that the data items are in the "TASKS" field of the result.
    }
}

Regards,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jay
Top achievements
Rank 2
answered on 07 Jan 2012, 12:41 AM
Thank you!  That is exactly what I was missing!
Tags
Grid
Asked by
Jay
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Jay
Top achievements
Rank 2
Share this question
or