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

Dealing with complex data in grid

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mr. Gravity
Top achievements
Rank 1
Mr. Gravity asked on 23 Mar 2012, 07:51 PM
$("#grid").kendoGrid({
        dataSource: {
            type: "json",
            transport: {
                read: "http://localhost:8888/mysite/xml/sample.json"
            },
            schema: {
                model: {
                    fields: {
                        id: { type: "number" },
                        data: { type: "json" }
                    }
                }
            },
            pageSize: 5
        },
        height: 250,
        pageable: true,
        columns: [{
                field:"id",
                title: "Record ID",
                filterable: false
            },
            {
                field: "data",
                title: "Data String"
            }
        ],
    });

and I have json data in this format:

[
   {
      "id":0,
      "data":[
         {
            "source":"Lotus Domino XML Mail",
            "title":"Mr SYDPER",
            "path":"/NSF//Marketing/Travel Itininery"
         }
      ]
   },
   {
      "id":1,
      "data":[
         {
            "source":"Lotus Domino XML Mail",
            "title":"Re: CMI statement for",
            "path":"/Marketing/Mark"
         }
      ]
   }
]

How do I have my data column display the data in the grid?

Thanks

2 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 04 May 2012, 08:35 AM
Hi,

Did you ever get a solution to this. I have a similar requirement with a nested JSON structure.

Thanks,

Mark.
0
Akif Kamal
Top achievements
Rank 1
answered on 24 Jul 2012, 08:04 AM
Any luck? I am looking for the same functionality
Tags
Grid
Asked by
Mr. Gravity
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Akif Kamal
Top achievements
Rank 1
Share this question
or