Web services

2 posts, 0 answers
  1. Jigar
    Jigar avatar
    3 posts
    Member since:
    Sep 2015

    Posted 20 Sep 2015 Link to this post

    Hi,

    I have created data source to connect online web service but when i run the code than in output just page is loading no data is rendering 

     This is the code:

    function onDeviceReady(){
        navigator.splashscreen.hide();
        
    }

    var employeeData;
    employeeData = new kendo.data.DataSource(
        {
        
            type:"odata",
            endlessScroll:true,
            batch:false,
            transport:{
                
                read:{
                url:"http://services.odata.org/V4/Northwind/Northwind.svc/Customers",
                dataType:"jsonp",
                
                data:{
                    
                    Accept:"application/json"
                }
                
            }

            }    
        });

  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 23 Sep 2015 Link to this post

    Hello Jigar,

    I suspect that the issue is caused by incorrect configuration. Looking at the URL it seems that you are trying to bind to a OData v4 service. However, the DataSource is set for OData v1. Also the service does not support JSONP.

    You may try the following configuration instead:

    var employeeData = new kendo.data.DataSource(
    {
     
      type:"odata-v4",
    //  endlessScroll:true, There is no such option
      batch:false,
      transport:{
     
        read:{
          dataType:"json"
        }
      }   
    });

    Regards,
    Rosen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top