This is a migrated thread and some comments may be shown as answers.
Scheduler not populating with data
1 Answer 41 Views
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 03 Mar 2014, 05:02 AM
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.

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 03 Mar 2014, 02:17 PM
Hello,

Could you verify that there are no JavaScript errors? You can use the browser web developer tool to check whether there are any errors.
As a side note the mentioned file is not attached. Nevertheless, the response from the server will be more helpful, as it will help us to track how the data source interprets it.

Regards,
Georgi Krustev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
S
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or