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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Get Data from Sql server database and bind to schedule control

Thread ID:





120516 Sep 22,2015 11:55 AM UTC Sep 23,2015 10:13 AM UTC ASP.NET MVC 1
Tags: Schedule
Asked On September 22, 2015 11:55 AM UTC

       I have used the below code to get the data.

       public ActionResult GetData()
            IEnumerable data = new ScheduleDataContext().DefaultSchedules.Take(2);
            return Json(data, JsonRequestBehavior.AllowGet);

     I have placed the GetData method in the controller named Schedule.

    And the .cshtml code is as follows.

    $(function () {

     var localServ = "/Schedule/GetData";

     var dManager = ej.DataManager({

     url: localServ,

     crudUrl: "/Schedule/CRUD"                // Here you have to pass the post action name for the crud operation


     dManager.adaptor = new ej.UrlAdaptor();

     var query = ej.Query().from("DefaultSchedules");//.select("id,Subject,Location,StartTime,EndTime,Description,Categorize,AllDay");


     enableAppointmentNavigation: false,

     currentDate: new Date(2015, 9, 22),

     appointmentSettings: {

     dataSource: dManager,

     tableName: "DefaultSchedules",

     query: query,

     id: "Id",

     subject: "Subject",

     //location: "Location",

     description: "Description",

     startTime: "StartTime",

     endTime: "EndTime",

     allDay: "AllDay",

     recurrence: "Recurrence",

     recurrenceRule: "RecurrenceRule"




     .AppointmentSettings(fields => fields.Datasource(ds => ds.URL("Schedule/GetData").Adaptor("UrlAdaptor"))

when i run the application, the browser shows the json data as below

[{"Id":1,"Subject":"Test Appointment","Description":"Test Appointment","StartTime":"\/Date(1442910600000)\/","EndTime":"\/Date(1442914200000)\/","AllDay":false,"Recurrence":false,"RecurrenceRule":"Test"}]
but the scheduler control is not visible. could you please tell me what changes needs to be done to get the appointment data bind to scheduler control ?


Sarath Kumar P K [Syncfusion]
Replied On September 23, 2015 10:13 AM UTC

Hi Saravanan,

Thanks for contacting Syncfusion support.

We have analyzed your reported issue with your code example. We suspect that you don’t have any appointments on the date schedule render initially. We request you to check the appointment data for a particular date in scheduler and to see the appointments. We have prepared a schedule sample to get the data from SQL and bind it to scheduler and it can be downloaded from the following location:

In the above sample we have appointments on date 10, 11, 12 and 14 August 2015.

Sarath Kumar P K


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon