SchedulerYearViewBuilder
Methods
StartDate(System.DateTime)
The start date of the view.
Parameters
startDate - System.DateTime
The startDate
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Messages(m => m.Views(v => v.Agenda("AgendaMessage")))
.Views(views =>
{
views.YearView(w => w.StartDate(DateTime.Now));
})
)
Months(System.Nullable)
The number of months that will be displayed in the year view calendar.
Parameters
months - System.Nullable<Double>
The number of months
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Messages(m => m.Views(v => v.Agenda("AgendaMessage")))
.Views(views =>
{
views.YearView(w => w.Months(3));
})
)
TooltipTemplate(System.String)
The template used to render the tooltip in year view.
Parameters
tooltipTemplate - System.String
The tooltipTemplate
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Messages(m => m.Views(v => v.Agenda("AgendaMessage")))
.Views(views =>
{
views.YearView(w => w.TooltipTemplate("TooltipTemplate"));
})
)
TooltipTemplateId(System.String)
The Id of the template used to render the tooltip in year view.
Parameters
tooltipTemplateId - System.String
The tooltipTemplateId
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Messages(m => m.Views(v => v.Agenda("AgendaMessage")))
.Views(views =>
{
views.YearView(w => w.TooltipTemplateId("TooltipTemplateId"));
})
)
TooltipTemplateHandler(System.String)
Parameters
tooltipTemplateHandler - System.String
TooltipTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
The view which contains the template used to render the tooltip in year view.
Parameters
tooltipTemplateView - Microsoft.AspNetCore.Html.IHtmlContent
The tooltipTemplateView
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Messages(m => m.Views(v => v.Agenda("AgendaMessage")))
.Views(views =>
{
views.YearView(w => w.TooltipTemplateView(Html.Partial("TooltipTemplate")));
})
)
Title(System.String)
The user-friendly title of the view displayed by the scheduler.
Parameters
title - System.String
The title
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =>
{
views.DayView(dayView => {
dayView.Title("Day");
});
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
Editable(System.Action)
Sets the editing configuration of the current scheduler view.
Parameters
configurator - System.Action<SchedulerViewEditableSettingsBuilder>
The lambda which configures the editing
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Editable(editable =>
{
editable.Confirmation(false);
editable.TemplateId("customEditTemplate");
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
Editable(System.Boolean)
If set to true the user would be able to create new scheduler events and modify or delete existing ones. Default value is true.
Parameters
isEditable - System.Boolean
The isEditable
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =>
{
views.DayView(dayView => {
dayView.Title("Day");
dayView.Editable(false);
});
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
EventTemplate(System.String)
The template used by the view to render the scheduler events.
Parameters
eventTemplate - System.String
The eventTemplate.
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.StartTime(new DateTime(2013, 6, 13, 10, 00, 00))
.EndTime(new DateTime(2013, 6, 13, 23, 00, 00))
.Height(600)
.EventTemplate(
"<div style='color:white'>" +
"<img src='" + Url.Content("~/Content/web/scheduler/") + "#= Image #' style='float:left'>" +
"<p>" +
"#: kendo.toString(Start, 'hh:mm') # - #: kendo.toString(End, 'hh:mm') #" +
"</p>" +
"<h3>#: title #</h3>" +
"<a href='#= Imdb #' style='color:white'>Movie in IMDB</a>" +
"</div>")
.Views(views =>
{
views.DayView();
views.AgendaView();
})
.BindTo(Model)
)
EventTemplateId(System.String)
The Id of the template used by the view to render the scheduler events.
Parameters
eventTemplateId - System.String
The eventTemplateId
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.StartTime(new DateTime(2013, 6, 13, 10, 00, 00))
.EndTime(new DateTime(2013, 6, 13, 23, 00, 00))
.Height(600)
.EventTemplateId("customEventTemplate")
.Views(views =>
{
views.DayView();
views.AgendaView();
})
.BindTo(Model)
)
EventTemplateView(Microsoft.AspNetCore.Html.IHtmlContent)
The view which contains the template used by the view to render the scheduler events.
Parameters
eventTemplateView - Microsoft.AspNetCore.Html.IHtmlContent
The eventTemplateView
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.StartTime(new DateTime(2013, 6, 13, 10, 00, 00))
.EndTime(new DateTime(2013, 6, 13, 23, 00, 00))
.Height(600)
.EventTemplateView(Html.Partial("customEventTemplate"))
.Views(views =>
{
views.DayView();
views.AgendaView();
})
.BindTo(Model)
)
EventTemplateHandler(System.String)
Parameters
eventTemplateHandler - System.String
SelectedDateFormat(System.String)
The format used to display the selected date. Uses kendo.format. Contains two placeholders - "{0}" and "{1}" which represent the start and end date displayed by the view.
Parameters
selectedDateFormat - System.String
The selectedDateFormat.
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =>
{
views.DayView(dayView => {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedDateFormat("{0:dd-MM-yyyy}");
});
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
SelectedShortDateFormat(System.String)
The format used to display the short selected date. Uses kendo.format. Contains two placeholders - "{0}" and "{1}" which represent the start and end date displayed by the view.
Parameters
selectedShortDateFormat - System.String
The selectedShortDateFormat.
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =>
{
views.DayView(dayView => {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedShortDateFormat("{0:dd-MM-yyyy}");
});
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
Selected(System.Boolean)
If set to true the view will be initially selected by the scheduler widget. Default value is false.
Parameters
isSelected - System.Boolean
The isSelected
Example
@(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =>
{
views.DayView(dayView => {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedDateFormat("{0:dd-MM-yyyy}");
dayView.Selected(true);
});
views.AgendaView();
})
.DataSource(d => d
.Model(m => m.Id(f => f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)
Groups(Kendo.Mvc.UI.SchedulerGroupOrientation)
Sets the orientation of the group headers
Parameters
orientation - SchedulerGroupOrientation
The orientation
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Views(v=> { v.TimelineMonthView(t => t.Groups(SchedulerGroupOrientation.Default)); })
)
Groups(System.Boolean)
Sets grouping by date
Parameters
date - System.Boolean
The grouping by date
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Views(v=> { v.TimelineMonthView(t => t.Groups(true)); })
)
Groups(System.Action)
Sets the resources grouping configuration of the view.
Parameters
configuration - System.Action<SchedulerGroupBuilder>
The lambda which configures the view grouping
Example
@(Html.Kendo().Scheduler<Activity>()
.Name("scheduler")
.Views(v=> { v.TimelineMonthView(t => t.Groups(x=>x.Date(true))); })
)