Reputation: 452
Lets say i had a json format like this
$(document).ready(function ()
{
$('#grid').kendoGrid(
{
scrollable: false,
dataSource: {data: [{ test: 1, data: [ { "TestHeader": "This is some test data"} ] }]},
columns: [ { field: 'TestHeader' } ]
});
});
how do i get the testHeader field to display on kendoui grid? if the json data is like this
{ test: 1, data: [ { "TestHeader": "This is some test data"} ] }
it would work, but not if it is nested like this
{data: [{ test: 1, data: [ { "TestHeader": "This is some test data"} ] }]}
I can't control what server return, so i can't change the return json, so how can i get this done?
Upvotes: 2
Views: 5078
Reputation: 452
I got it done already, using schema: parse on datasource found it at here How can I use nested Json to populate Kendo UI grid?
Upvotes: 2