Hi,
In a scenario like this example here: http://jsfiddle.net/H4kNW/light/
How should the schema model be on my datasource when I want to use nested fields like this in my view model:
<input id="first" data-bind="value: Person.FirstName"/>
<input data-bind="value: Person.MiddleName"/>
<input data-bind="value: Person.LastName"/>
I tried:
But this did not work. Please advise of the correct way someone?
Much appreciated!
In a scenario like this example here: http://jsfiddle.net/H4kNW/light/
How should the schema model be on my datasource when I want to use nested fields like this in my view model:
<input id="first" data-bind="value: Person.FirstName"/>
<input data-bind="value: Person.MiddleName"/>
<input data-bind="value: Person.LastName"/>
I tried:
var schemaModel = kendo.data.Model.define({
id: "Id",
fields: {
Id: { editable: false, type: "number" },
Person: {
FirstName: { editable: false, type: "string" },
MiddleName: { editable: true, type: "string" },
LastName: { editable: true, type: "string" }
}
}
});
But this did not work. Please advise of the correct way someone?
Much appreciated!