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

Defines the fluent interface for configuring the SchedulerBaseViewBuilder<TView, TViewBuilder>.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TView

TViewBuilder

Syntax:

C#
public class SchedulerBaseViewBuilder<TView, TViewBuilder> where TView : class, ISchedulerView where TViewBuilder : SchedulerBaseViewBuilder<TView, TViewBuilder>

Inheritance: objectSchedulerBaseViewBuilder<TView, TViewBuilder>

Derived Classes: SchedulerAgendaViewBuilder<TView>SchedulerCustomViewBuilder<TView>SchedulerMonthViewBuilder<TView>SchedulerMultiDayViewBuilder<TView>SchedulerTimelineViewBuilderBase<TView, TTimelineViewBuilder>SchedulerYearViewBuilder<TView>...

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the SchedulerBaseViewBuilder<TView, TViewBuilder> class.

C#
public SchedulerBaseViewBuilder(TView view)
Parameters:viewTView

The resource

Fields

view

TView

C#
protected readonly TView view

Methods

Sets the editing configuration of the current scheduler view.

C#
public TViewBuilder Editable(Action<SchedulerViewEditableSettingsBuilder> configurator)
Parameters:configuratorAction<SchedulerViewEditableSettingsBuilder>

The lambda which configures the editing

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Editable(e=&gt;e.Confirmation(true))
)

If set to true the user would be able to create new scheduler events and modify or delete existing ones. Default value is true.

C#
public TViewBuilder Editable(bool isEditable)
Parameters:isEditablebool

The isEditable

Returns:

TViewBuilder

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.DayView(dayView =&gt; {
dayView.Title("Day");
dayView.Editable(false);
});
views.AgendaView();
})
.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")
)
)

Defines the template used by the view to render the Scheduler events. The available fields in the template are:

  • description: The event description.
  • end: The event end date.
  • resources: The event resources.
  • start: The event start date.
  • title: The event title.
C#
public TViewBuilder EventTemplate(string eventTemplate)
Parameters:eventTemplatestring

The value that configures the template content.

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Screening&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.DayView(dayView =&gt; dayView.EventTemplate("&lt;div&gt;Title: #: title #&lt;/div&gt;"));
})
)

Defines the template used by the view to render the Scheduler events. The available fields in the template are:

  • description: The event description.
  • end: The event end date.
  • resources: The event resources.
  • start: The event start date.
  • title: The event title.
C#
public TViewBuilder EventTemplate<TModel>(TemplateBuilder<TModel> template)
Parameters:templateTemplateBuilder<TModel>

A Template component that configures the template.

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.DayView(dayView =&gt; dayView.EventTemplate(Html.Kendo().Template().AddHtml("&lt;div&gt;Title: ${data.title}&lt;/div&gt;")));
})
)

Defines the template used by the view to render the Scheduler events. The available fields in the template are:

  • description: The event description.
  • end: The event end date.
  • resources: The event resources.
  • start: The event start date.
  • title: The event title.
C#
public TViewBuilder EventTemplateHandler(string eventTemplate)
Parameters:eventTemplatestring

The JavaScript function that returns the template.

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.DayView(dayView =&gt; dayView.EventTemplateHandler("getEventTemplate"));
})
)
&lt;script&gt;
function getEventTemplate(data) {
return `&lt;div&gt;Title: ${data.title} &lt;/div&gt;`;
}
&lt;/script&gt;

Defines the template used by the view to render the Scheduler events. The available fields in the template are:

  • description: The event description.
  • end: The event end date.
  • resources: The event resources.
  • start: The event start date.
  • title: The event title.
C#
public TViewBuilder EventTemplateId(string eventTemplateId)
Parameters:eventTemplateIdstring

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

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Kendo.Mvc.Examples.Models.Scheduler.Screening&gt;()
.Name("scheduler")
.Views(views =&gt;
{
views.DayView(dayView =&gt; dayView.EventTemplateId("eventTemplate"));
})
)
&lt;script id="eventTemplate" type="text/x-kendo-template"&gt;
&lt;div&gt;Title: #: title #&lt;/div&gt;
&lt;/script&gt;

Defines the template used by the view to render the Scheduler events. The available fields in the template are:

  • description: The event description.
  • end: The event end date.
  • resources: The event resources.
  • start: The event start date.
  • title: The event title.
C#
public TViewBuilder EventTemplateView(MvcHtmlString eventTemplate)
Parameters:eventTemplateMvcHtmlString

The Razor View that contains the template.

Returns:

TViewBuilder

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

Sets the resources grouping configuration of the view.

C#
public TViewBuilder Groups(Action<SchedulerGroupBuilder> configuration)
Parameters:configurationAction<SchedulerGroupBuilder>

The lambda which configures the view grouping

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt; { v.TimelineMonthView(t =&gt; t.Groups(x=&gt;x.Date(true))); })
)

Sets grouping by date.

C#
public TViewBuilder Groups(bool date)
Parameters:datebool

The grouping by date

Returns:

TViewBuilder

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

Sets the orientation of the group headers

C#
public TViewBuilder Groups(SchedulerGroupOrientation orientation)
Parameters:orientationSchedulerGroupOrientation

The orientation

Returns:

TViewBuilder

Example:
C#
@(Html.Kendo().Scheduler&lt;Activity&gt;()
.Name("scheduler")
.Views(v=&gt; { v.TimelineMonthView(t =&gt; t.Groups(SchedulerGroupOrientation.Default)); })
)

If set to true the view will be initially selected by the scheduler widget. Default value is false.

C#
public TViewBuilder Selected(bool isSelected)
Parameters:isSelectedbool

The isSelected

Returns:

TViewBuilder

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.DayView(dayView =&gt; {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedDateFormat("{0:dd-MM-yyyy}");
dayView.Selected(true);
});
views.AgendaView();
})
.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 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.

C#
public TViewBuilder SelectedDateFormat(string selectedDateFormat)
Parameters:selectedDateFormatstring

The selectedDateFormat.

Returns:

TViewBuilder

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.DayView(dayView =&gt; {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedDateFormat("{0:dd-MM-yyyy}");
});
views.AgendaView();
})
.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 format used to display the selected short date. Uses kendo.format. Contains two placeholders - "{0}" and "{1}" which represent the start and end date displayed by the view.

C#
public TViewBuilder SelectedShortDateFormat(string selectedShortDateFormat)
Parameters:selectedShortDateFormatstring

The selectedShortDateFormat.

Returns:

TViewBuilder

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.DayView(dayView =&gt; {
dayView.Title("Day");
dayView.Editable(false);
dayView.SelectedShortDateFormat("{0:dd-MM-yyyy}");
});
views.AgendaView();
})
.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 user-friendly title of the view displayed by the scheduler.

C#
public TViewBuilder Title(string title)
Parameters:titlestring

The title

Returns:

TViewBuilder

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.DayView(dayView =&gt; {
dayView.Title("Day");
});
})
.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")
)
)