This is a migrated thread and some comments may be shown as answers.

Read datascource issue

1 Answer 34 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
corey
Top achievements
Rank 1
corey asked on 08 Aug 2013, 07:51 PM
Does the read datasource not work if a list of a model is returned?
This is the code im using to try and populate the scheduler but everything ive tried makes it return blank. Could it be because im trying to return a list of models?
public ActionResult PopulateCalendar()
        {
            using (var entities = new OpenRoad.Data.Repository.OpenRoadEntities())
            {
                var appointments = (from e in entities.Appointments
                                    where e.UserId == OpenRoad.Web.Session.UserId
 
                                    select new Models.Calendar
                                    {
                                        TaskID = e.AppointmentId,
                                        UserId = e.UserId ?? '1',
                                        Title = e.Subject,
                                        Description=e.Description,
                                        Start = e.StartTimeUtc ?? DateTime.Now,
                                        End = e.EndTimeUtc ?? DateTime.Now,
                                        IsAllDay = false,
                                        
 
                                    }).OrderBy(o => o.Start).ToList();
                 
                return Json(appointments, JsonRequestBehavior.AllowGet);
            }            
        }

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 12 Aug 2013, 03:08 PM
Hi Corey,

 
From the provided information it's not clear for us what is the exact reason for this behavior - could you please provide the Scheduler code? This would help us pinpoint the exact reason for this behavior.

Also I would suggest to check this help article in our documentation for more information about how to setup correctly the Scheduler. 

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