I am trying to read the Entity1 using the dataSource schema from the returned json object.
The Json Object is as follow
{
"odata.metadata":"http://localhost:25061/odata/$metadata#Entity,"value":[
{
"Entity1":{
"LastName":"Smith","FirstName":"James"},"Id":1,"Other":2},{
"Entity1":{
"LastName":"Smith","FirstName":"Alex"},"Id":2,"Other":3}
}]
}Datasource Schema
schema: {
data: function (data) { return data.value; },
total: function (data) { return data["odata.count"]; },
},Model
$("#grid").kendoGrid({
dataSource: dataSource,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "LastName" },
{ field: "FirstName" }
]
});Thanks,
DG
The Json Object is as follow
{
"odata.metadata":"http://localhost:25061/odata/$metadata#Entity,"value":[
{
"Entity1":{
"LastName":"Smith","FirstName":"James"},"Id":1,"Other":2},{
"Entity1":{
"LastName":"Smith","FirstName":"Alex"},"Id":2,"Other":3}
}]
}Datasource Schema
schema: {
data: function (data) { return data.value; },
total: function (data) { return data["odata.count"]; },
},Model
$("#grid").kendoGrid({
dataSource: dataSource,
filterable: true,
sortable: true,
pageable: true,
columns: [
{ field: "LastName" },
{ field: "FirstName" }
]
});Thanks,
DG