Hi, I'm trying to implement Scheduler in a MVC4 Razor project...
I follow the sample in your project, but i can't make appointment show.
Post some code:
public
ActionResult Gantt()
{
ViewBag.Message =
"GANTT"
;
return
View(ganttService.GetGantt());
}
public
virtual
JsonResult Read([DataSourceRequest] DataSourceRequest request)
{
return
Json(ganttService.GetGantt());
}
public
class
GanttViewModel : ISchedulerEvent
{
public
string
Description
{
get
;
set
;
}
public
DateTime End
{
get
;
set
;
}
public
bool
IsAllDay
{
get
;
set
;
}
public
string
RecurrenceException
{
get
;
set
;
}
public
string
RecurrenceRule
{
get
;
set
;
}
public
DateTime Start
{
get
;
set
;
}
public
string
Title
{
get
;
set
;
}
}
public
virtual
IQueryable<GanttViewModel> GetGantt()
{
List<GanttViewModel> retValue =
new
List<GanttViewModel>();
GanttViewModel md1 =
new
GanttViewModel { Title =
"TIT1"
, Description =
"DES1"
, Start = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc), End = DateTime.SpecifyKind(DateTime.Now.AddHours(3), DateTimeKind.Utc) };
retValue.Add(md1);
return
(retValue.AsQueryable());
}
@(Html.Kendo().Scheduler<
FinitenessEvo.Models.GanttViewModel
>()
.Name("scheduler")
.Date(DateTime.Today)
.StartTime(DateTime.Today)
.Height(600)
.Timezone("Etc/UTC")
.Views(views =>
{
views.DayView();
views.WeekView(weekView => weekView.Selected(true));
views.MonthView();
views.AgendaView();
})
.DataSource(o => o.Model(m => { m.Id(f => f.Description); }).Read("Read","Home"))
)