This is a migrated thread and some comments may be shown as answers.

Schema Structure on DataSource with nested fields in MVVM

2 Answers 288 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 10 Mar 2012, 07:46 PM
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:
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!

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 14 Mar 2012, 01:20 PM
Hi Carl,

I am afraid that currently the dataSource does not support hierarchical structures. The implementation of such functionality is planned, but it will not be available in the next official release.

Greetings,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Petr
Top achievements
Rank 1
answered on 21 Aug 2012, 03:07 PM
Hi Alexander,

I vote also for this feature, can you say approx. date when and if this feature will be available, please?.

Regards,
Petr Ciml

Tags
MVVM
Asked by
Carl
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Petr
Top achievements
Rank 1
Share this question
or