Jegan Kunniya
Jegan Kunniya

Reputation: 992

How to define a Kendo Grid Schema model for the described scenario?

I am stuck in the process of consuming my Data service ODATA response using Kendo Grid. The problem is that, I am not able to arrive at a schema model that fits the response.

Please find the JSON response of my service.

{
  "d" : [{
    "__metadata": {
      "uri": "http://localhost/TestService/TestService.svc/Order('4345')", 
      "type": "DataModels.OrderDetail"
    }, 
    "ItemList": [{
      "__metadata": {
        "uri": "http://localhost/TestService/TestService.svc/Item('1')", 
        "type": "DataModels.Item"
      }, 
      "ItemId": "1", 
      "Name": "TestItem", 
      "Rate": "19.00", 
      "Quantity": "3"
    }]
  }]
}

Need some suggestion / help that can let me move forward in this effort.

Upvotes: 0

Views: 658

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30671

You can try the following

schema: {
      data: "d.ItemList"
}

Upvotes: 1

Related Questions