React Scheduler - 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.

App.vue
  • <template>
  • <DxScheduler
  • :data-source="dataSource"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  •  
  • import DxScheduler from 'devextreme-vue/scheduler';
  • import ODataStore from 'devextreme/data/odata/store';
  •  
  • const dataSource = new ODataStore({
  • url: "http://url/to/odata/service",
  • onLoaded: function () {
  • // Event handling commands go here
  • }
  • });
  •  
  • export default {
  • components: {
  • DxScheduler
  • },
  • data() {
  • return {
  • dataSource
  • }
  • }
  • }
  • </script>

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 property is set false to prevent data from being partitioned because the Scheduler does not support paging.

App.vue
  • <template>
  • <DxScheduler
  • :data-source="dataSource"
  • />
  • </template>
  •  
  • <script>
  • import 'devextreme/dist/css/dx.common.css';
  • import 'devextreme/dist/css/dx.light.css';
  • import "devextreme/data/odata/store";
  •  
  • import DxScheduler from 'devextreme-vue/scheduler';
  • import DataSource from 'devextreme/data/data_source';
  •  
  • const dataSource = new DataSource({
  • store: {
  • type: "odata",
  • url: "http://url/to/odata/service"
  • },
  • filter: ["Not_Assigned", "=", true],
  • paginate: false
  • });
  •  
  • export default {
  • components: {
  • DxScheduler
  • },
  • data() {
  • return {
  • dataSource
  • }
  • }
  • }
  • </script>
NOTE
Setting the ODataStore's deserializeDates property to false may cause filtering issues in the Scheduler. See this property's description for details.
See Also