The kendo documentation has the following example for defining a datasource schema:
this schema definition works for basic fields such as string, number etc but what if i wanted to have another field which is an inner datasource? for example:
tried this. no error is given, but the inner datasource is always empty. is that the correct way to achieve this? is there an online example for such scenerio?
var dataSource = new kendo.data.DataSource({ schema: { model: { id: "ProductID", fields: { ProductID: { //this field will not be editable (default value is true) editable: false, // a defaultValue will not be assigned (default value is false) nullable: true }, ProductName: { //set validation rules validation: { required: true } }, UnitPrice: { //data type of the field {Number|String|Boolean|Date} default is String type: "number", // used when new model is created defaultValue: 42, validation: { required: true, min: 1 } } } } }});this schema definition works for basic fields such as string, number etc but what if i wanted to have another field which is an inner datasource? for example:
var dataSource = new kendo.data.DataSource({ schema: { model: { id: "ProductID", fields: { AttributesDataSource: new kendo.data.DataSource({ // datasource config here
}) } } }});tried this. no error is given, but the inner datasource is always empty. is that the correct way to achieve this? is there an online example for such scenerio?