All docs
V19.1
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

DevExtreme jQuery - OData Service

Use the ODataStore to bind the Scheduler to data an OData service provides. It presents an interface for loading and editing data and allows you to handle data-related events.

jQuery
JavaScript
$(function() {
    $("#schedulerContainer").dxScheduler({
        dataSource: new DevExpress.data.ODataStore({
            url: "http://url/to/odata/service"
            onLoaded: function () {
                // Event handling commands go here
            }
        })
    });
});
Angular
TypeScript
HTML
import { DxSchedulerModule } from "devextreme-angular";
import ODataStore from "devextreme/data/odata/store";
// ...
export class AppComponent {
    appointmentStore = new ODataStore({
        url: "http://url/to/odata/service",
        onLoaded: function () {
            // Event handling commands go here
        }
    });
}
@NgModule({
    imports: [
        // ...
        DxSchedulerModule
    ],
    // ...
})
<dx-scheduler
    [dataSource]="appointmentStore">
</dx-scheduler>

Data kept in the ODataStore can be processed in the DataSource. For example, the DataSource can filter data as shown in the following code. Note that the paginate option is set false to prevent data from being partitioned because the Scheduler does not support paging.

jQuery
JavaScript
$(function() {
    $("#schedulerContainer").dxScheduler({
        dataSource: new DevExpress.data.DataSource({
            store: {
                type: "odata",
                url: "http://url/to/odata/service"
            },
            filter: ["Not_Assigned", "=", true],
            paginate: false
        })
    });
});
Angular
TypeScript
HTML
import { DxSchedulerModule } from "devextreme-angular";
import "devextreme/data/odata/store";
import DataSource from "devextreme/data/data_source";
// ...
export class AppComponent {
    appointmentDataSource = new DataSource({
        store: {
            type: "odata",
            url: "http://url/to/odata/service",
        },
        filter: ["Not_Assigned", "=", true],
        paginate: false
    });
}
@NgModule({
    imports: [
        // ...
        DxSchedulerModule
    ],
    // ...
})
<dx-scheduler
    [dataSource]="appointmentDataSource">
</dx-scheduler>
NOTE
Setting the ODataStore's deserializeDates option to false may cause filtering issues in the Scheduler. See this option's description for details.
See Also