We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

117639 Nov 20,2014 11:58 AM Nov 21,2014 08:24 AM JavaScript 2
loading
Tags: ejSchedule
Sergiy Tokarchuk
Asked On November 20, 2014 11:58 AM

In samples to use ejSchedule : 


   var dManager = ej.DataManager({

                url: "http://mvc.syncfusion.com/OdataServices/Northwnd.svc"

            });

// Query creation

   var queryString = ej.Query().from("Events").take(10);

 

$(function () {

    $("#Schedule1").ejSchedule({

                appointmentSettings: {

                    dataSource: dManager, query: queryString

                }

            });

     });


But what if i don't want to create WCF Odata for schedule what if i have the method like this  http://mysrervice.svc/getsdata that return JSON   with fields Subject,ID,recurrence and all other fields. 
The question is how to parse JSON data to Schedule Appointments  ? 
...

Sergiy Tokarchuk
Replied On November 20, 2014 12:44 PM

Figure out : 
 var       wd = [{
                Id: 100,
                Subject: "Bering Sea Gold",
                StartTime: new Date(new Date().setMinutes(new Date().getMinutes() + 6)),
                EndTime: new Date(new Date().setHours(new Date().getHours() + 2)),
                AllDay: false,
                Recurrence: true,
                RecurrenceRule: "FREQ=DAILY;INTERVAL=2;COUNT=10"
            },
    {
        Id: 101,
        Subject: "Bering Sea Gold",
        StartTime: new Date().setHours(4, 0),
        EndTime: new Date().setHours(5, 0),
        AllDay: false,
        Recurrence: false
    },

            ];

            var dManager = ej.DataManager(wd);
            $("#Schedule1").ejSchedule({
                width: "100%",
                height: "525px",
                appointmentSettings: {
                    // the dManager collections
                    dataSource: dManager, ....


syncfusion Guys please make online docs BETTER !!! 

Krishna Priya Sethuramalingam [Syncfusion]
Replied On November 21, 2014 08:24 AM

Hi Sergiy,

 Thanks for using syncfusion products.

Query 1: We are displaying the appointments based on the JSON data, so you are passing the JSON data, hence no need of any conversion. But we need to bind the "appointment fields" as mentioned in the below code snippet.

<Code>

appointmentSettings: {

 

                    dataSource: dManager,

                    id: "Id",

                    subject: "Subject",

                    startTime: "StartTime",

                    endTime: "EndTime",

                    allDay: "AllDay",

                    recurrence: "Recurrence",

                    recurrenceRule: "RecurrenceRule"

 

                }

</Code>

We have attached sample for your reference and sample could be dowloaded from the following location.

http://www.syncfusion.com/downloads/support/directtrac/general/F117639-1595709916.zip


Query 2:

We will update the document in our online location ASAP.

Please let us know, if you need any other assistance.

Regards,

Krishna Priya.S


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;