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

How to create a datasource from existing datasource

0 Answers 48 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Dhananjay
Top achievements
Rank 1
Dhananjay asked on 21 Jun 2012, 04:27 AM
I have an existing datasource as following , 

var data;    
      data = new kendo.data.DataSource(
      {
          type: "odata",
          pageSize: 5,
          endlessScroll: true,
          scrollTreshold: 30,
          transport:{
                       read: {
                           url: "http://odata.netflix.com/Catalog/Titles",
                           dataType: "jsonp",
 
                           data: {
                               Accept: "application/json"
                           }
                       }
                   }
 
               });

I want to create other datasource from this data source. I tried 
var data1 = new kendo.data.DataSource({
                    transport: {
                                   read: data.data()
                                    
                                }
                          });
                 data1.read();

it is throwing exception then I tried 
var data1 = new kendo.data.DataSource({ read: data.data()});
               data1.read();

It is throwing exception in all case.  My req is to create a filtered datasource from existing datasource .

Thanks 
Dhananjay Kumar

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Dhananjay
Top achievements
Rank 1
Share this question
or