Wijmo UI for the Web
OData Web Service
Wijmo User Guide > Data > Data Concepts > RemoteDataView > OData Web Service

When you use the wijmo.data module with an OData web service, you need to use the ODataView Class to set the service URL. To use an OData web service, use a script like the following.

OData Script
Copy Code
function ViewModel() {
            var productView = new wijmo.data.ODataView("http://services.odata.org/Northwind/Northwind.svc/Products", {
                ajax: { dataType: "jsonp" },
                pageSize: 10                
            });

In this sample, we set the type of data view we want to use, the service URL, and the pageSize.

Note that we do not supply a sessionID like we did with the general web service.

We also set an ajax setting, dataType, to jsonp. This allows you to make cross domain requests from your server. You can specify it using the crossOrigin property or the dataType property.

For a full sample demonstrating a general OData web service, please see the How To topic Use an OData Web Service.

See Also

How To

Reference