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

Multiple DataSource Models?

3 Answers 302 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 13 Apr 2012, 12:07 AM
In your documentation I see references to Models (plural) and the function get(), but I don't see any examples of dealing with multiple models.

So, is it possible to define multiple models for a given datasource?

More importantly, can the models be bound to a property within the schema?

i.e.

If the schema has two arrays:

{ Data :
    {
        Items: [ { ... } ],
        Persons: [ { ... } ]
    }
}

Such that Schema is bound to Data, model 1 is bound to Items, and model 2 is bound to Persons.

If this is possible, could someone post an example of how to do this?
    

3 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 13 Apr 2012, 03:19 PM
Hi Steven,

This functionality is not supported by the dataSource component. It is possible to define only one model per dataSource instance.

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
Steven
Top achievements
Rank 1
answered on 13 Apr 2012, 03:40 PM
Might be a good feature request?  ;-)

This way you could hit a complex data source without having to write all kinds of parse code.
0
Alexander Valchev
Telerik team
answered on 17 Apr 2012, 08:18 AM
Hi Steven,

Actually there is already a similar idea (that includes multiple models support) logged in our user voice page. Please check it and if you wish cast a vote for it. If it gather more votes we will rise its priority.

Regards,
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!
Tags
Data Source
Asked by
Steven
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Steven
Top achievements
Rank 1
Share this question
or