Your search did not match any results.

Web API Service


This example demonstrates the Scheduler widget communicating with a Web API service. All data editing and data processing operations are delegated to the server. The DevExtreme.AspNet.Data extension’s method configures access to the server from the client. The server implementation is available under the SchedulerDataController tab in the ASP.NET MVC version of this demo.

Copy to CodePen
window.onload = function() { var url = ""; var viewModel = { schedulerOptions: { dataSource:{ key: "AppointmentId", loadUrl: url + "/Get", insertUrl: url + "/Post", updateUrl: url + "/Put", deleteUrl: url + "/Delete", onBeforeSend: function(method, ajaxOptions) { ajaxOptions.xhrFields = { withCredentials: true }; } }), remoteFiltering: true, views: ["day", "workWeek", "month"], currentView: "day", currentDate: new Date(2017, 4, 23), startDayHour: 9, endDayHour: 19, height: 600, textExpr: "Text", startDateExpr: "StartDate", endDateExpr: "EndDate", allDayExpr: "AllDay" } }; ko.applyBindings(viewModel, document.getElementById("scheduler-demo")); };
<!DOCTYPE html> <html xmlns=""> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <script src=""></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery-3.1.0.min.js"%3E%3C/script%3E'))</script> <script src=""></script> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <link rel="dx-theme" data-theme="generic.light" href="" /> <script src=""></script> <script src=""></script> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container"> <div id="scheduler-demo"> <div data-bind="dxScheduler: schedulerOptions"></div> </div> </div> </body> </html>