New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent interface for configuring the SchedulerTimelineViewBase.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TView

TTimelineViewBuilder

Syntax:

C#
public abstract class SchedulerTimelineViewBuilderBase<TView, TTimelineViewBuilder> : SchedulerBaseViewBuilder<TView, TTimelineViewBuilder> where TView : SchedulerTimelineViewBase where TTimelineViewBuilder : SchedulerTimelineViewBuilderBase<TView, TTimelineViewBuilder>

Inheritance: objectSchedulerBaseViewBuilder<TView, TTimelineViewBuilder>SchedulerTimelineViewBuilderBase<TView, TTimelineViewBuilder>

Derived Classes: SchedulerTimelineMonthViewBuilder<TView>SchedulerTimelineViewBuilder<TView>SchedulerTimelineWeekViewBuilder<TView>SchedulerTimelineWorkWeekViewBuilder<TView>

Inherited Members SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.viewSchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Title(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Editable(Action<SchedulerViewEditableSettingsBuilder>)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Editable(bool)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.EventTemplate(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.EventTemplateId(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.EventTemplateView(IHtmlContent)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.EventTemplateHandler(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.EventTemplate<TModel>(TemplateBuilder<TModel>)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.SelectedDateFormat(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.SelectedShortDateFormat(string)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Selected(bool)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Groups(SchedulerGroupOrientation)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Groups(bool)SchedulerBaseViewBuilder<TView, TTimelineViewBuilder>.Groups(Action<SchedulerGroupBuilder>)object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

SchedulerTimelineViewBuilderBase method.

C#
public SchedulerTimelineViewBuilderBase(TView resource)
Parameters:resourceTView

Methods

The width of the scheduler timeline view column.

C#
public TTimelineViewBuilder ColumnWidth(int columnWidth)
Parameters:columnWidthint

The columnWidth

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.ColumnWidth(20)))
)

Defines the template used to render the date header cells. The option is supported for Day, Week, WorkWeek, and Timeline views. By default the Scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier (the abbreviated name of the week day), will be localized based on the current Kendo UI culture. To control the day and month order, use a custom template. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder DateHeaderTemplate(string dateHeaderTemplate)
Parameters:dateHeaderTemplatestring

The value that configures the template content.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.DateHeaderTemplate("&lt;strong&gt;#=kendo.toString(date, 'd')#&lt;/strong&gt;")))
)

Defines the template used to render the date header cells. The option is supported for Day, Week, WorkWeek, and Timeline views. By default the Scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier (the abbreviated name of the week day), will be localized based on the current Kendo UI culture. To control the day and month order, use a custom template. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder DateHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.DateHeaderTemplate(Html.Kendo().Template().AddHtml("&lt;strong&gt;${kendo.toString(data.date, 'd')}&lt;/strong&gt;")));
})
)

Defines the template used to render the date header cells. The option is supported for Day, Week, WorkWeek, and Timeline views. By default the Scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier (the abbreviated name of the week day), will be localized based on the current Kendo UI culture. To control the day and month order, use a custom template. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder DateHeaderTemplateHeader(string dateHeaderTemplateHeader)
Parameters:dateHeaderTemplateHeaderstring

The JavaScript function that returns the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.DateHeaderTemplateHeader("getDateHeaderTemplate"));
})
)
&lt;script&gt;
function getDateHeaderTemplate(data) {
return `&lt;strong&gt;${kendo.toString(data.date, 'd')}&lt;/strong&gt;`;
}
&lt;/script&gt;

Defines the template used to render the date header cells. The option is supported for Day, Week, WorkWeek, and Timeline views. By default the Scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier (the abbreviated name of the week day), will be localized based on the current Kendo UI culture. To control the day and month order, use a custom template. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder DateHeaderTemplateId(string dateHeaderTemplateId)
Parameters:dateHeaderTemplateIdstring

The "id" attribute of the external Kendo UI Template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.DateHeaderTemplateId("dateHeaderTemplate")))
)
&lt;script id="dateHeaderTemplate" type="text/x-kendo-template"&gt;
&lt;strong&gt;#=kendo.toString(date, 'd')#&lt;/strong&gt;
&lt;/script&gt;

Defines the template used to render the date header cells. The option is supported for Day, Week, WorkWeek, and Timeline views. By default the Scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier (the abbreviated name of the week day), will be localized based on the current Kendo UI culture. To control the day and month order, use a custom template. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder DateHeaderTemplateView(IHtmlContent dateHeaderTemplateView)
Parameters:dateHeaderTemplateViewIHtmlContent

The Razor View that contains the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.DateHeaderTemplateView(Html.Partial("DateHeaderTemplate"))))
)

The end time of the view. The scheduler will display events ending before the endTime.

C#
public TTimelineViewBuilder EndTime(DateTime endTime)
Parameters:endTimeDateTime

The endTime

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Task&gt;()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; {
timelineView.Title("Day");
timelineView.StartTime(new DateTime(2013, 6, 13, 10, 00, 00));
timelineView.EndTime(new DateTime(2013, 6, 13, 23, 00, 00));
});
})
.DataSource(d =&gt; d
.Model(m =&gt; m.Id(f =&gt; f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)

The end time of the view. The scheduler will display events ending before the endTime.

C#
public TTimelineViewBuilder EndTime(int hours, int minutes, int seconds)
Parameters:hoursint

The hours

minutesint

The minutes

secondsint

The seconds

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Task&gt;()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; {
timelineView.Title("Day");
timelineView.StartTime(new DateTime(2013, 6, 13, 10, 00, 00));
timelineView.EndTime(23,0,0);
});
})
.DataSource(d =&gt; d
.Model(m =&gt; m.Id(f =&gt; f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)

The height of the scheduler event rendered in timeline view.

C#
public TTimelineViewBuilder EventHeight(object eventHeight)
Parameters:eventHeightobject

The eventHeight

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.EventHeight(20)))
)

If set to false the scheduler will not display the "footer" area. Default value is true.

C#
public TTimelineViewBuilder Footer(bool showFooter)
Parameters:showFooterbool

The footer

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.Footer(true)))
)

Defines the template used to render the group headers of the Scheduler Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • text: The group text.
  • color: The group color.
  • value: The group value.
  • field: The field of the event, which contains the resource id.
  • title: The 'title' option of the resource.
  • name: The 'name' option of the resource.
C#
public TTimelineViewBuilder GroupHeaderTemplate(string groupHeaderTemplate)
Parameters:groupHeaderTemplatestring

The value that configures the template content.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.GroupHeaderTemplate("&lt;strong style='color: #=color#'&gt;#: text #&lt;/strong&gt;")))
)

Defines the template used to render the group headers of the Scheduler Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • text: The group text.
  • color: The group color.
  • value: The group value.
  • field: The field of the event, which contains the resource id.
  • title: The 'title' option of the resource.
  • name: The 'name' option of the resource.
C#
public TTimelineViewBuilder GroupHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.GroupHeaderTemplate(Html.Kendo().Template().AddHtml("&lt;strong style='color: ${data.color}'&gt;${data.text}&lt;/strong&gt;")));
})
)

Defines the template used to render the group headers of the Scheduler Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • text: The group text.
  • color: The group color.
  • value: The group value.
  • field: The field of the event, which contains the resource id.
  • title: The 'title' option of the resource.
  • name: The 'name' option of the resource.
C#
public TTimelineViewBuilder GroupHeaderTemplateHandler(string groupHeaderTemplateHandler)
Parameters:groupHeaderTemplateHandlerstring

The JavaScript function that returns the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.GroupHeaderTemplateHandler("getGroupHeaderTemplate"));
})
)
&lt;script&gt;
function getGroupHeaderTemplate(data) {
return `&lt;strong style='color: ${data.color}'&gt;${data.text}&lt;/strong&gt;`;
}
&lt;/script&gt;

Defines the template used to render the group headers of the Scheduler Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • text: The group text.
  • color: The group color.
  • value: The group value.
  • field: The field of the event, which contains the resource id.
  • title: The 'title' option of the resource.
  • name: The 'name' option of the resource.
C#
public TTimelineViewBuilder GroupHeaderTemplateId(string groupHeaderTemplateId)
Parameters:groupHeaderTemplateIdstring

The "id" attribute of the external Kendo UI Template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.GroupHeaderTemplateId("groupHeaderTemplate")))
)
&lt;script id="groupHeaderTemplate" type="text/x-kendo-template"&gt;
&lt;strong style='color: #=color#'&gt;#: text #&lt;/strong&gt;
&lt;/script&gt;

Defines the template used to render the group headers of the Scheduler Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • text: The group text.
  • color: The group color.
  • value: The group value.
  • field: The field of the event, which contains the resource id.
  • title: The 'title' option of the resource.
  • name: The 'name' option of the resource.
C#
public TTimelineViewBuilder GroupHeaderTemplateView(IHtmlContent groupHeaderTemplateView)
Parameters:groupHeaderTemplateViewIHtmlContent

The Razor View that contains the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.GroupHeaderTemplateView(Html.Partial("GroupHeaderTemplate"))))
)

The number of minutes represented by a major tick.

C#
public TTimelineViewBuilder MajorTick(int majorTick)
Parameters:majorTickint

The majorTick

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.MajorTick(20)))
)

Defines the template used to render the major ticks. The option is supported for Day, Week, WorkWeek, and Timeline views. By default, the Scheduler renders the time using the current culture time format. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder MajorTimeHeaderTemplate(string majorTimeHeaderTemplate)
Parameters:majorTimeHeaderTemplatestring

The value that configures the template content.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.MajorTimeHeaderTemplate("&lt;strong&gt;#=kendo.toString(date, 'h')#&lt;/strong&gt;&lt;sup&gt;00&lt;/sup&gt;")))
)

Defines the template used to render the major ticks. The option is supported for Day, Week, WorkWeek, and Timeline views. By default, the Scheduler renders the time using the current culture time format. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder MajorTimeHeaderTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.MajorTimeHeaderTemplate(Html.Kendo().Template().AddHtml("&lt;strong&gt;${kendo.toString(data.date, 'h')}&lt;/strong&gt;&lt;sup&gt;00&lt;/sup&gt;")));
})
)

Defines the template used to render the major ticks. The option is supported for Day, Week, WorkWeek, and Timeline views. By default, the Scheduler renders the time using the current culture time format. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder MajorTimeHeaderTemplateHandler(string majorTimeHeaderTemplateHandler)
Parameters:majorTimeHeaderTemplateHandlerstring

The JavaScript function that returns the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.MajorTimeHeaderTemplateHandler("getMajorTimeHeaderTemplate"));
})
)
&lt;script&gt;
function getMajorTimeHeaderTemplate(data) {
return `&lt;strong&gt;${kendo.toString(data.date, 'h')}&lt;/strong&gt;&lt;sup&gt;00&lt;/sup&gt;`;
}
&lt;/script&gt;

Defines the template used to render the major ticks. The option is supported for Day, Week, WorkWeek, and Timeline views. By default, the Scheduler renders the time using the current culture time format. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder MajorTimeHeaderTemplateId(string majorTimeHeaderTemplateId)
Parameters:majorTimeHeaderTemplateIdstring

The "id" attribute of the external Kendo UI Template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.MajorTimeHeaderTemplateId("majorHeaderTemplate"));
})
)
&lt;script id="majorHeaderTemplate" type="text/x-kendo-template"&gt;
&lt;strong&gt;#=kendo.toString(date, 'h')#&lt;/strong&gt;&lt;sup&gt;00&lt;/sup&gt;
&lt;/script&gt;

Defines the template used to render the major ticks. The option is supported for Day, Week, WorkWeek, and Timeline views. By default, the Scheduler renders the time using the current culture time format. The available field in the template is "date", which represents the major tick date.

C#
public TTimelineViewBuilder MajorTimeHeaderTemplateView(IHtmlContent majorTimeHeaderTemplateView)
Parameters:majorTimeHeaderTemplateViewIHtmlContent

The Razor View that contains the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.MajorTimeHeaderTemplateView(Html.Partial("MajorHeaderTemplateView")));
})
)

The number of time slots to display per major tick.

C#
public TTimelineViewBuilder MinorTickCount(int minorTickCount)
Parameters:minorTickCountint

The minorTickCount

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.MinorTickCount(20)))
)

If set the view will be initially shown in business hours mode.

C#
public TTimelineViewBuilder ShowWorkHours()
Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.ShowWorkHours()))
)

If set to true the view will be initially shown in business hours mode.

C#
public TTimelineViewBuilder ShowWorkHours(bool value)
Parameters:valueboolReturns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.ShowWorkHours(false)))
)

Defines the template used to render the time slot cells. The option is supported for Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • date: Represents the slot date and time.
  • resources(): Returns the relevant resources for the current slot.
C#
public TTimelineViewBuilder SlotTemplate(string slotTemplate)
Parameters:slotTemplatestring

The value that configures the template content.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.SlotTemplate("&lt;strong&gt;#=kendo.toString(date)#&lt;/strong&gt;"));
})
)

Defines the template used to render the time slot cells. The option is supported for Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • date: Represents the slot date and time.
  • resources(): Returns the relevant resources for the current slot.
C#
public TTimelineViewBuilder SlotTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.SlotTemplate(Html.Kendo().Template().AddHtml("&lt;strong&gt;${kendo.toString(data.date)}&lt;/strong&gt;")));
})
)

Defines the template used to render the time slot cells. The option is supported for Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • date: Represents the slot date and time.
  • resources(): Returns the relevant resources for the current slot.
C#
public TTimelineViewBuilder SlotTemplateHandler(string slotTemplateHandler)
Parameters:slotTemplateHandlerstring

The JavaScript function that returns the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.SlotTemplateHandler("getSlotTemplate"));
})
)
&lt;script&gt;
function getSlotTemplate(data) {
return `&lt;strong&gt;${kendo.toString(data.date)}&lt;/strong&gt;`;
}
&lt;/script&gt;

Defines the template used to render the time slot cells. The option is supported for Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • date: Represents the slot date and time.
  • resources(): Returns the relevant resources for the current slot.
C#
public TTimelineViewBuilder SlotTemplateId(string slotTemplateId)
Parameters:slotTemplateIdstring

The "id" attribute of the external Kendo UI Template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.SlotTemplateId("slotTemplate"));
})
)
&lt;script id="slotTemplate" type="text/x-kendo-template"&gt;
&lt;strong&gt;#=kendo.toString(date)#&lt;/strong&gt;
&lt;/script&gt;

Defines the template used to render the time slot cells. The option is supported for Day, Week, WorkWeek, and Timeline views. The available fields in the template are:

  • date: Represents the slot date and time.
  • resources(): Returns the relevant resources for the current slot.
C#
public TTimelineViewBuilder SlotTemplateView(IHtmlContent slotTemplateView)
Parameters:slotTemplateViewIHtmlContent

The Razor View that contains the template.

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; timelineView.SlotTemplateView(Html.Partial("SlotTemplateView")));
})
)

The start time of the view. The scheduler will display events starting after the startTime.

C#
public TTimelineViewBuilder StartTime(DateTime startTime)
Parameters:startTimeDateTime

The startTime

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Task&gt;()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; {
timelineView.Title("Day");
timelineView.StartTime(new DateTime(2013, 6, 13, 10, 00, 00));
timelineView.EndTime(new DateTime(2013, 6, 13, 23, 00, 00));
});
})
.DataSource(d =&gt; d
.Model(m =&gt; m.Id(f =&gt; f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)

The start time of the view. The scheduler will display events starting after the startTime.

C#
public TTimelineViewBuilder StartTime(int hours, int minutes, int seconds)
Parameters:hoursint

The hours

minutesint

The minutes

secondsint

The seconds

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Task&gt;()
.Name("scheduler")
.Date(new DateTime(2013, 6, 13))
.Views(views =&gt;
{
views.TimelineView(timelineView =&gt; {
timelineView.Title("Day");
timelineView.StartTime(10,0,0);
timelineView.EndTime(new DateTime(2013, 6, 13, 23, 00, 00));
});
})
.DataSource(d =&gt; d
.Model(m =&gt; m.Id(f =&gt; f.TaskID))
.Read("Read", "Scheduler")
.Create("Create", "Scheduler")
.Destroy("Destroy", "Scheduler")
.Update("Update", "Scheduler")
)
)

If set to false the scheduler will not display the "WorkDayCommand" button. Default value is true.

C#
public TTimelineViewBuilder WorkDayCommand(bool showWorkDayCommand)
Parameters:showWorkDayCommandbool

The showWorkDayCommand

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDayCommand(false)))
)

The end time of the business hours. The scheduler will display events before the workDayEnd if "WorkDayCommand" button is clicked.

C#
public TTimelineViewBuilder WorkDayEnd(DateTime workDayEnd)
Parameters:workDayEndDateTime

The WorkDayEnd

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDayEnd(DateTime.Now)))
)

The end time of the business hours. The scheduler will display events before the workDayEnd if "WorkDayCommand" button is clicked.

C#
public TTimelineViewBuilder WorkDayEnd(int hours, int minutes, int seconds)
Parameters:hoursint

The hours

minutesint

The minutes

secondsint

The seconds

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDayEnd(4, 15, 30)))
)

Sets the working days (index based).

C#
public TTimelineViewBuilder WorkDays(int[] workDays)
Parameters:workDaysint[]

The indices of the days of the week

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDays(new int[] {3, 4, 5})))
)

The start time of the business hours. The scheduler will display events after the workDayStart if "WorkDayCommand" button is clicked.

C#
public TTimelineViewBuilder WorkDayStart(DateTime workDayStart)
Parameters:workDayStartDateTime

The WorkDayStart

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDayStart(DateTime.Now)))
)

The start time of the business hours. The scheduler will display events after the workDayStart if "WorkDayCommand" button is clicked.

C#
public TTimelineViewBuilder WorkDayStart(int hours, int minutes, int seconds)
Parameters:hoursint

The hours

minutesint

The minutes

secondsint

The seconds

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkDayStart(4, 15, 30)))
)

Sets the end day of work week by index.

C#
public TTimelineViewBuilder WorkWeekEnd(int workWeekEndDay)
Parameters:workWeekEndDayint

The workWeekEndDay

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkWeekEnd(4)))
)

Sets the start day of work week by index.

C#
public TTimelineViewBuilder WorkWeekStart(int workWeekStartDay)
Parameters:workWeekStartDayint

The workWeekStartDay

Returns:

TTimelineViewBuilder

Returns the current TTimelineViewBuilder instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v =&gt; v.TimelineView(timelineView =&gt; timelineView.WorkWeekStart(3)))
)