Hi, From one of the example in kendo documentation, when i am trying the same i am unable to bind the data to the scheduler ui, it shows no error but only 500 internal server error. here is my code, I am using mvc 3 razor with EF.
public class Projection : ISchedulerEvent
{
public string Title { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
public string Description { get; set; }
public bool IsAllDay { get; set; }
public string Recurrence { get; set; }
public string RecurrenceRule { get; set; }
public string RecurrenceException { get; set; }
public string EndTimezone { get; set; }
public string StartTimezone { get; set; }
}
[HttpGet]
public ActionResult Read()
{
List<Projection> cinemaSchedule = new List<Projection> {
new Projection {
Title = "Fast and furious 6",
Start = new DateTime(2014,3,31,17,00,00),
End= new DateTime(2014,3,31,18,30,00)
},
new Projection {
Title= "The Internship",
Start= new DateTime(2014,3,31,14,00,00),
End= new DateTime(2014,3,31,15,30,00)
},
new Projection {
Title = "The Perks of Being a Wallflower",
Start = new DateTime(2014,3,31,16,00,00),
End = new DateTime(2014,3,31,17,30,00)
}};
return Json(cinemaSchedule, JsonRequestBehavior.AllowGet);
}
@(Html.Kendo().Scheduler<Uco.Models.Projection>()
.Name("scheduler")
.Date(new DateTime(2014, 3, 31))
.StartTime(new DateTime(2014, 3, 31, 7, 00, 00))
.Height(600)
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
})
.Timezone("Etc/UTC")
.BindTo(Model)
)
Can any one help with where i am wrong. I am new to telerik. Thanks in advance
public class Projection : ISchedulerEvent
{
public string Title { get; set; }
public DateTime Start { get; set; }
public DateTime End { get; set; }
public string Description { get; set; }
public bool IsAllDay { get; set; }
public string Recurrence { get; set; }
public string RecurrenceRule { get; set; }
public string RecurrenceException { get; set; }
public string EndTimezone { get; set; }
public string StartTimezone { get; set; }
}
[HttpGet]
public ActionResult Read()
{
List<Projection> cinemaSchedule = new List<Projection> {
new Projection {
Title = "Fast and furious 6",
Start = new DateTime(2014,3,31,17,00,00),
End= new DateTime(2014,3,31,18,30,00)
},
new Projection {
Title= "The Internship",
Start= new DateTime(2014,3,31,14,00,00),
End= new DateTime(2014,3,31,15,30,00)
},
new Projection {
Title = "The Perks of Being a Wallflower",
Start = new DateTime(2014,3,31,16,00,00),
End = new DateTime(2014,3,31,17,30,00)
}};
return Json(cinemaSchedule, JsonRequestBehavior.AllowGet);
}
@(Html.Kendo().Scheduler<Uco.Models.Projection>()
.Name("scheduler")
.Date(new DateTime(2014, 3, 31))
.StartTime(new DateTime(2014, 3, 31, 7, 00, 00))
.Height(600)
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
})
.Timezone("Etc/UTC")
.BindTo(Model)
)
Can any one help with where i am wrong. I am new to telerik. Thanks in advance