How to create a datasource from existing datasource

1 posts, 0 answers
  1. Dhananjay
    Dhananjay avatar
    5 posts
    Member since:
    Apr 2011

    Posted 20 Jun 2012 Link to this post

    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
Back to Top