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

Web services

1 Answer 58 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Jigar
Top achievements
Rank 1
Jigar asked on 20 Sep 2015, 09:00 PM

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"
            }
            
        }

        }    
    });

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 23 Sep 2015, 08:40 AM

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!
 
Tags
Data Source
Asked by
Jigar
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or