ODataStore

A Store providing access to a separate OData web service entity.

Included in: dx.mobile.js, dx.web.js, dx.viz.js, dx.viz-web.js, dx.all.js
Export: default
Type: Object

To access the entire OData service, use the ODataContext object.

If you need to create a separate ODataStore instance, call the ODataStore constructor and specify the URL of the required entity via the url configuration option.

JavaScript
var store = new DevExpress.data.ODataStore({
    url: "/url/to/service",
    key: "CategoryID",
    keyType: "Int32"
});

Note that the key and keyType configuration options provide read-write access to the entity.

See Also

When using a widget as an ASP.NET MVC Control, declare the ODataStore using the syntax shown in the following example. This example configures the DataGrid widget.

Razor C#
Razor VB
@(Html.DevExtreme().DataGrid()
    .ID("dataGrid")
    .DataSource(ds => ds.OData()
        .Version(4)
        .Url("http://services.odata.org/V4/Northwind/Northwind.svc/Products")
        .JSONP(true)
        .Key("ProductID")
        .Expand("Category")
    )
)
@(Html.DevExtreme().DataGrid() _
    .ID("dataGrid") _
    .DataSource(Function(ds)
        Return ds.OData() _
                 .Version(4) _
                 .Url("http://services.odata.org/V4/Northwind/Northwind.svc/Products") _
                 .JSONP(True) _
                 .Key("ProductID") _
                 .Expand("Category")
    End Function)
)
See Also

Configuration

This section describes the configuration options used to configure the ODataStore.

Methods

This section describes the methods used to access the data associated with the ODataStore.

Events

This section describes events raised by this ODataStore instance.

To handle events, use one of the following methods.