I am trying to populate Kendo scheduler using WCF web services. My service is working fine as i checked with "fiddler".
But scheduler is not displaying any data.
My code for scheduler implementation is as follows:
<body>
<div id="scheduler"></div>
<script src="js/jquery.min.js"></script>
<script src="js/kendo.all.min.js"></script>
<script src="Scripts/jquery-2.1.0.min.js"></script>
<script src="js/kendo.web.min.js"></script>
<link href="styles/kendo.common.min.css" rel="stylesheet" />
<link href="styles/kendo.default.min.css" rel="stylesheet" />
<script>
$(function () {
$("#scheduler").kendoScheduler({
date: new Date("2014/2/20"),
startTime: new Date("2014/2/20 07:00 AM"),
timezone: "Etc/UTC",
height: 600,
views: [
"day",
{ type: "week", selected: true },
"month",
"agenda"
],
dataSource: {
batch: true,
transport: {
read: {
url: "http://localhost/WcfServiceSaturday/ServiceSaturday.svc/getapp",
dataType: "json",
contentType: "application/json; charset=utf-8"
},
create: {
url: "http://localhost/WcfServiceSaturday/ServiceSaturday.svc/insertapp",
dataType: "json"
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
}
},
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskId", type: "number" },
title: { from: "Title", type: "string" },
start: { type: "date", from: "Start" },
end: { type: "date", from: "Ends" },
startTimezone: { type: "string", from: "StartTimezone" },
endTimezone: { type: "string", from: "EndTimezone" },
description: { type: "string", from: "Description" },
recurrenceId: { type: "string", from: "RecurranceId" },
recurrenceRule: { type: "string", from: "RecurranceRule" },
recurrenceException: { type: "string", from: "RecurranceException" },
ownerId: { from: "OwnerId", type: "number" },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
},
},
});
});
</script>
</body>
I am attaching my WCF service file as attachment.
But scheduler is not displaying any data.
My code for scheduler implementation is as follows:
<body>
<div id="scheduler"></div>
<script src="js/jquery.min.js"></script>
<script src="js/kendo.all.min.js"></script>
<script src="Scripts/jquery-2.1.0.min.js"></script>
<script src="js/kendo.web.min.js"></script>
<link href="styles/kendo.common.min.css" rel="stylesheet" />
<link href="styles/kendo.default.min.css" rel="stylesheet" />
<script>
$(function () {
$("#scheduler").kendoScheduler({
date: new Date("2014/2/20"),
startTime: new Date("2014/2/20 07:00 AM"),
timezone: "Etc/UTC",
height: 600,
views: [
"day",
{ type: "week", selected: true },
"month",
"agenda"
],
dataSource: {
batch: true,
transport: {
read: {
url: "http://localhost/WcfServiceSaturday/ServiceSaturday.svc/getapp",
dataType: "json",
contentType: "application/json; charset=utf-8"
},
create: {
url: "http://localhost/WcfServiceSaturday/ServiceSaturday.svc/insertapp",
dataType: "json"
},
parameterMap: function (options, operation) {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
}
},
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "TaskId", type: "number" },
title: { from: "Title", type: "string" },
start: { type: "date", from: "Start" },
end: { type: "date", from: "Ends" },
startTimezone: { type: "string", from: "StartTimezone" },
endTimezone: { type: "string", from: "EndTimezone" },
description: { type: "string", from: "Description" },
recurrenceId: { type: "string", from: "RecurranceId" },
recurrenceRule: { type: "string", from: "RecurranceRule" },
recurrenceException: { type: "string", from: "RecurranceException" },
ownerId: { from: "OwnerId", type: "number" },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
},
},
});
});
</script>
</body>
I am attaching my WCF service file as attachment.