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

Defines the fluent interface for configuring the SchedulerMonthView.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TView

Syntax:

C#
public class SchedulerMonthViewBuilder<TView> : SchedulerBaseViewBuilder<TView, SchedulerMonthViewBuilder<TView>> where TView : SchedulerMonthView

Inheritance: objectSchedulerBaseViewBuilder<TView, SchedulerMonthViewBuilder<TView>>SchedulerMonthViewBuilder<TView>

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

Constructors

C#
public SchedulerMonthViewBuilder(TView resource)
Parameters:resourceTView

Methods

Increases the slot height when containing events up to views.eventsPerDay and reduces its height if there are less events for that specific day.

C#
public SchedulerMonthViewBuilder<TView> AdaptiveSlotHeight(bool adaptiveSlotHeight)
Parameters:adaptiveSlotHeightbool

The adaptiveSlotHeight

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt;
{
v.MonthView(m =&gt; m.AdaptiveSlotHeight(true));
})
)

Defines the template used to render the day slots in the month view. The available fields in the template are:

  • date: Represents the current date.
  • resources(): Returns the relevant resources for the current slot.
C#
public SchedulerMonthViewBuilder<TView> DayTemplate(string dayTemplate)
Parameters:dayTemplatestring

The value that configures the template content.

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.MonthView(w =&gt; w.DayTemplate("&lt;strong&gt;#= kendo.toString(date, 'ddd') #&lt;/strong&gt;"));
})
)

Defines the template used to render the day slots in the month view. The available fields in the template are:

  • date: Represents the current date.
  • resources(): Returns the relevant resources for the current slot.
C#
public SchedulerMonthViewBuilder<TView> DayTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

SchedulerMonthViewBuilder<TView>

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

Defines the template used to render the day slots in the month view. The available fields in the template are:

  • date: Represents the current date.
  • resources(): Returns the relevant resources for the current slot.
C#
public SchedulerMonthViewBuilder<TView> DayTemplateHandler(string dayTemplate)
Parameters:dayTemplatestring

The JavaScript function that returns the template.

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.MonthView(w =&gt; w.DayTemplateHandler("getDayTemplate"));
})
)
&lt;script&gt;
function getDayTemplate(data) {
return `&lt;strong&gt;${kendo.toString(data.date, 'ddd')}&lt;/strong&gt;`;
}
&lt;/script&gt;

Defines the template used to render the day slots in the month view. The available fields in the template are:

  • date: Represents the current date.
  • resources(): Returns the relevant resources for the current slot.
C#
public SchedulerMonthViewBuilder<TView> DayTemplateId(string dayTemplateId)
Parameters:dayTemplateIdstring

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

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.MonthView(w =&gt; w.DayTemplateId("dayTemplate"));
})
)
&lt;script id="dayTemplate" type="text/x-kendo-template"&gt;
&lt;strong&gt;#= kendo.toString(date, 'ddd') #&lt;/strong&gt;
&lt;/script&gt;

Defines the template used to render the day slots in the month view. The available fields in the template are:

  • date: Represents the current date.
  • resources(): Returns the relevant resources for the current slot.
C#
public SchedulerMonthViewBuilder<TView> DayTemplateView(MvcHtmlString dayTemplate)
Parameters:dayTemplateMvcHtmlString

The Razor View that contains the template.

Returns:

SchedulerMonthViewBuilder<TView>

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

The height of the scheduler event rendered in month and timeline views. In month view it could be set to a concrete number or to the string value "auto". When set to "auto" it will automatically set the views.adaptiveRowHeight property to true.

C#
public SchedulerMonthViewBuilder<TView> EventHeight(object eventHeight)
Parameters:eventHeightobject

The eventHeight

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt;
{
v.MonthView(m =&gt; m.EventHeight(new {}));
})
)

Specifies the distance between individual events.

C#
public SchedulerMonthViewBuilder<TView> EventSpacing(double? eventSpacing)
Parameters:eventSpacingdouble?

The eventSpacing

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt;
{
v.MonthView(m =&gt; m.EventSpacing(2));
})
)

Indicates how many events could be listed for a day. When there are more events for a specific day a "more" link will be placed at the bottom of the day slot and will navigate to the day view if clicked.

C#
public SchedulerMonthViewBuilder<TView> EventsPerDay(double? eventsPerDay)
Parameters:eventsPerDaydouble?

The eventsPerDay

Returns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt;
{
v.MonthView(m =&gt; m.EventsPerDay(2));
})
)

Controls how event overflow is opened in the Month view. When set to true, clicking the more-events link opens a popover for the date. When set to false, clicking the link uses the legacy behavior and navigates to the Day view.

C#
public SchedulerMonthViewBuilder<TView> MoreEventsPopover(bool enable)
Parameters:enableboolReturns:

SchedulerMonthViewBuilder<TView>

Returns the current SchedulerMonthViewBuilder<TView> instance.

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.MonthView(w =&gt; w.MoreEventsPopover(false));
})
)

Enables the DOM virtualization for vertical grouping of the view - renders batches of DOM elements as you scroll. The views that support this option are: "day", "week", "workWeek", "month".

C#
public SchedulerMonthViewBuilder<TView> Virtual(bool enable)
Parameters:enableboolReturns:

SchedulerMonthViewBuilder<TView>

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt;
{
v.MonthView(m =&gt; m.Virtual(true));
})
)