Hi,
I have a Kendo grid reading from a DataSource that maps to some JSON returned from our application's API. The JSON contains some main objects which can have zero or more subobjects, like this:
[ { "itemId": 123, "text": "blah", "subItems": [ { "subItemId": 1, "subItemText": "foo" }, { "subItemId": "2", "subItemText": "banana" } ] }, ...]Using DataSource.schema.model I can easily define the data types for the fields in the main objects:
var dataSource = new kendo.data.DataSource({ schema: { model: { id: 'itemId', fields: { itemId: { type: 'number' }, text: { type: 'string' } } });How do I go about defining the model for the fields in the subitems?
Thanks for any help,
Nigel
