JSHunjan
JSHunjan

Reputation: 397

bind complex json to kendo grid

I am facing problem in binding data in child objects in Kendo ui grid. My data looks like this

{"Mydata":{"output":[{"Id":48,"Name":"abc"}]}

If the data is returned like

{"Id":48,"Name":"abc"}

this I can easily bind. how can I bind data within child objects.? Please suggest.

Upvotes: 0

Views: 911

Answers (1)

OnaBai
OnaBai

Reputation: 40917

Set in the DataSource schema.data to Mydata.output. Something like:

var dataSource = new kendo.data.DataSource({
    transport: {
        read: ...
    },
    schema: {
        data: "Mydata.output"
    }
});

Upvotes: 1

Related Questions