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

Combine from multiple json url's?

1 Answer 366 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 13 Jun 2013, 03:01 PM
Hello,

Is it possible to have a DataSource read and combine from multiple json files?

Something like:
var ds1 = new kendo.data.DataSource({
    transport: {
        read: [
            { url: function() { return "data/Monday.json"; }, dataType: "json"},
            { url: function() { return "data/Tuesday.json"; }, dataType: "json"}
            ]
    },
If not, is there an alternative that allows combining DataSources together?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 17 Jun 2013, 05:42 AM
Hi Demetrus,

I am afraid that this is not supported by Kendo DataSource - by design the component's transport can read data from a single url at a time.

It is possible to define a custom transport function, which gives the developer an opportunity to implement his/hers own read logic. You can find an example in the corresponding documentation.

Regarding your second question, it is not possible to literally "combine" DataSources together. If you wish to achieve a similar effect, you can use the data method to get data from and set data to a given DataSource instance.

Regards,
Alexander Valchev
Telerik
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
Steve
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or