HI, I'm beginner for Telerik Platform with hybrid app. Sorry for this dummy question. I'm trying to load a scheduler with a web service which returns the following:
{"JSONDataResult":[{"Description":"Full Name","End":"\/Date(1458450000000-0500)\/","EndTimezone":null,"IsAllDay":true,"OwnerID":"1","RecurrenceException":null,"RecurrenceID":null,"RecurrenceRule":null,"Start":"\/Date(1458450000000-0500)\/","StartTimezone":null,"TaskID":"1","Title":"Full Name"},{"Description":"Full Name","End":"\/Date(1458450000000-0500)\/","EndTimezone":null,"IsAllDay":true,"OwnerID":"2","RecurrenceException":null,"RecurrenceID":null,"RecurrenceRule":null,"Start":"\/Date(1458450000000-0500)\/","StartTimezone":null,"TaskID":"2","Title":"Full Name"}]}
View model is the following, but it no works. What's wrong?. Thanks so much for your help.
var
viewModel = kendo.observable({
isVisible:
true
,
tasks:
new
kendo.data.SchedulerDataSource({
batch:
true
,
transport: {
read: {
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"
, defaultValue:
"No title"
, validation: { required:
true
} },
start: { type:
"date"
, from:
"Start"
},
end: { type:
"date"
, from:
"End"
},
startTimezone: { from:
"StartTimezone"
},
endTimezone: { from:
"EndTimezone"
},
description: { from:
"Description"
},
recurrenceId: { from:
"RecurrenceID"
},
recurrenceRule: { from:
"RecurrenceRule"
},
recurrenceException: { from:
"RecurrenceException"
},
isAllDay: { type:
"boolean"
, from:
"IsAllDay"
}
}
}
}
})
});