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

SchedulerBuilder

Defines the fluent API for configuring the Kendo UI Scheduler

Properties

WriteAction - Func

Methods

StartTime(System.Int32,System.Int32,System.Int32)

The start time of the week and day views. The scheduler will display events starting after the startTime.

Parameters

hours - System.Int32

The hours

minutes - System.Int32

The minutes

seconds - System.Int32

The seconds

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .StartTime(10, 0, 0)
                .BindTo(Model)
            )

EndTime(System.Int32,System.Int32,System.Int32)

The end time of the week and day views. The scheduler will display events ending before the endTime.

Parameters

hours - System.Int32

The hours

minutes - System.Int32

The minutes

seconds - System.Int32

The seconds

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .EndTime(10,0,0)
                .BindTo(Model)
            )

WorkDayStart(System.Int32,System.Int32,System.Int32)

Sets the start of the work day when the "Show business hours" button is clicked.

Parameters

hours - System.Int32

The hours

minutes - System.Int32

The minutes

seconds - System.Int32

The seconds

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .WorkDayStart(10, 0, 0)
                .BindTo(Model)
            )

WorkDays(System.Int32[])

Sets the working days (index based).

Parameters

workDays - System.Int32[]

The indices of the days of the week

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .WorkDays(new int[] { 1,3,4,5 })
                .BindTo(Model)
            )

WorkDayEnd(System.Int32,System.Int32,System.Int32)

Sets the end of the work day when the "Show business hours" button is clicked.

Parameters

hours - System.Int32

The hours

minutes - System.Int32

The minutes

seconds - System.Int32

The seconds

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .WorkDayEnd(16,0,0)
                .BindTo(Model)
            )

BindTo(System.Collections.Generic.IEnumerable)

Parameters

dataSource - System.Collections.Generic.IEnumerable<T>

DataSource(System.Action)

Configures the DataSource options.

Parameters

configurator - System.Action<SchedulerAjaxDataSourceBuilder>

The DataSource configurator action.

Example


             @( Html.Kendo().Scheduler<Task>()
                        .Name("Scheduler")
                        .DataSource(source =>
                        {
                            source.Read(read =>
                            {
                                read.Action("Read", "Scheduler");
                            });
                        })
            )

Toolbar(System.Action)

Adds PDF command to the toolbar.

Parameters

addToolbarAction - System.Action<SchedulerToolbarFactory>

Example


            @(Html.Kendo().Scheduler<Task>()
                .Name("scheduler")
                .Toolbar(toolbar => toolbar.Pdf())
                .Pdf(pdf => pdf.FileName("SchedulerExport.pdf"))
                .DataSource(dataSource =>
                    // configure the data source
                    dataSource
                        .Ajax()
                        .Read("Read", "Scheduler")
                )
            )

Mobile()

Enables the adaptive rendering when viewed on mobile browser

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Screening>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .Mobile()
            )

Editable(System.Action)

Sets the editing configuration of the scheduler.

Parameters

configurator - System.Action<SchedulerEditableSettingsBuilder>

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 false the user would not be able to create new scheduler events and modify or delete existing ones.

Parameters

isEditable - System.Boolean

The isEditable

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .Editable(false)
                .DataSource(d => d
                    .Model(m => m.Id(f => f.TaskID))
                        .Read("Read", "Scheduler")
                )
            )

Group(System.Action)

Sets the resources grouping configuration of the scheduler.

Parameters

configuration - System.Action<SchedulerGroupBuilder>

The lambda which configures the scheduler grouping

Example


            @(Html.Kendo().Scheduler<Task>()
               .Name("Scheduler")
               .Resources(resource =>
               {
                   resource.Add(m => m.TaskID)
                       .Title("Color")
                       .Multiple(true)
                       .DataTextField("Text")
                       .DataValueField("Value")
                       .DataSource(d => d.Read("Attendies", "Scheduler"));
               })
               .DataSource(dataSource => dataSource
                   .Model(m => m.Id(f => f.TaskID))
               ))

Resources(System.Action)

Sets the resources configuration of the scheduler.

Parameters

addResourceAction - System.Action<SchedulerResourceFactory>

The lambda which configures the scheduler resources

Example


            @(Html.Kendo().Scheduler<Task>()
               .Name("Scheduler")
               .Resources(resource =>
               {
                   resource.Add(m => m.TaskID)
                       .Title("Color")
                       .Multiple(true)
                       .DataTextField("Text")
                       .DataValueField("Value")
                       .DataSource(d => d.Read("Attendies", "Scheduler"));
               })
               .DataSource(dataSource => dataSource
                   .Model(m => m.Id(f => f.TaskID))
               ))

Views(System.Action)

Sets the views configuration of the scheduler.

Parameters

addViewAction - System.Action<SchedulerViewFactory>

The lambda which configures the scheduler views

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .Views(views => {
                    views.DayView();
                    views.AgendaView();
                })
                .BindTo(Model)
            )

AllDayEventTemplate(System.String)

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title.

Parameters

value - System.String

The value for AllDayEventTemplate

AllDayEventTemplateId(System.String)

The template used to render the "all day" scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; isAllDay Boolean - if true the event is "all day"; resources Array - the event resources; start Date - the event start date or title String - the event title.

Parameters

templateId - System.String

The ID of the template element for AllDayEventTemplate

AllDaySlot(System.Boolean)

If set to true the scheduler will display a slot for "all day" events.

Parameters

value - System.Boolean

The value for AllDaySlot

AutoBind(System.Boolean)

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. That will also apply for data sources for the resources used in the widget. By default the widget will bind to the data source specified in the configuration.

Parameters

value - System.Boolean

The value for AutoBind

CurrentTimeMarker(System.Action)

If set to false the "current time" marker of the scheduler would not be displayed.

Parameters

configurator - System.Action<SchedulerCurrentTimeMarkerSettingsBuilder>

The configurator for the currenttimemarker setting.

CurrentTimeMarker(System.Boolean)

If set to false the "current time" marker of the scheduler would not be displayed.

Parameters

enabled - System.Boolean

Enables or disables the currenttimemarker option.

Date(System.DateTime)

The current date of the scheduler. Used to determine the period which is displayed by the widget.

Parameters

value - System.DateTime

The value for Date

DateHeaderTemplate(System.String)

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date..

Parameters

value - System.String

The value for DateHeaderTemplate

DateHeaderTemplateId(System.String)

The template used to render the date header cells.By default the scheduler renders the date using a custom date format - "ddd M/dd". The "ddd" specifier represents the abbreviated name of the week day and will be localized using the current Kendo UI culture. If the developer wants to control the day and month order, then one needs to define a custom template.The fields which can be used in the template are: date - represents the major tick date..

Parameters

templateId - System.String

The ID of the template element for DateHeaderTemplate

EndTime(System.DateTime)

The end time of the week and day views. The scheduler will display events ending before the endTime.

Parameters

value - System.DateTime

The value for EndTime

EventTemplate(System.String)

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title.

Parameters

value - System.String

The value for EventTemplate

EventTemplateId(System.String)

The template used to render the scheduler events.The fields which can be used in the template are: description String - the event description; end Date - the event end date; resources Array - the event resources; start Date - the event start date or title String - the event title.

Parameters

templateId - System.String

The ID of the template element for EventTemplate

Footer(System.Action)

If set to false the footer of the scheduler would not be displayed.

Parameters

configurator - System.Action<SchedulerFooterSettingsBuilder>

The configurator for the footer setting.

Footer(System.Boolean)

If set to false the footer of the scheduler would not be displayed.

Parameters

enabled - System.Boolean

Enables or disables the footer option.

GroupHeaderTemplate(System.String)

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource.

Parameters

value - System.String

The value for GroupHeaderTemplate

GroupHeaderTemplateId(System.String)

The template used to render the group headers of scheduler day, week, workWeek and timeline views.The fields which can be used in the template are: text String - the group text; color String - the group color; value - the group value; field String - the field of the scheduler event which contains the resource id; title String - the 'title' option of the resource or name String - the 'name' option of the resource.

Parameters

templateId - System.String

The ID of the template element for GroupHeaderTemplate

Height(System.Double)

The height of the widget. Numeric values are treated as pixels.

Parameters

value - System.Double

The value for Height

MajorTick(System.Int32)

The number of minutes represented by a major tick.

Parameters

value - System.Int32

The value for MajorTick

MajorTimeHeaderTemplate(System.String)

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date..

Parameters

value - System.String

The value for MajorTimeHeaderTemplate

MajorTimeHeaderTemplateId(System.String)

The template used to render the major ticks.By default the scheduler renders the time using the current culture time format.The fields which can be used in the template are: date - represents the major tick date..

Parameters

templateId - System.String

The ID of the template element for MajorTimeHeaderTemplate

Max(System.DateTime)

Constraints the maximum date which can be selected via the scheduler navigation.

Parameters

value - System.DateTime

The value for Max

Messages(System.Action)

The configuration of the scheduler messages. Use this option to customize or localize the scheduler messages.

Parameters

configurator - System.Action<SchedulerMessagesSettingsBuilder>

The configurator for the messages setting.

Min(System.DateTime)

Constraints the minimum date which can be selected via the scheduler navigation.

Parameters

value - System.DateTime

The value for Min

MinorTickCount(System.Int32)

The number of time slots to display per major tick.

Parameters

value - System.Int32

The value for MinorTickCount

MinorTimeHeaderTemplate(System.String)

The template used to render the minor ticks.By default the scheduler renders a "&nbsp;".The fields which can be used in the template are: date - represents the major tick date..

Parameters

value - System.String

The value for MinorTimeHeaderTemplate

MinorTimeHeaderTemplateId(System.String)

The template used to render the minor ticks.By default the scheduler renders a "&nbsp;".The fields which can be used in the template are: date - represents the major tick date..

Parameters

templateId - System.String

The ID of the template element for MinorTimeHeaderTemplate

Pdf(System.Action)

Configures the Kendo UI Scheduler PDF export settings.

Parameters

configurator - System.Action<SchedulerPdfSettingsBuilder>

The configurator for the pdf setting.

Selectable(System.Boolean)

If set to true the user would be able to select scheduler cells and events. By default selection is disabled.

Parameters

value - System.Boolean

The value for Selectable

Selectable()

If set to true the user would be able to select scheduler cells and events. By default selection is disabled.

ShowWorkHours(System.Boolean)

If set to true the view will be initially shown in business hours mode. By default view is displayed in full day mode.

Parameters

value - System.Boolean

The value for ShowWorkHours

ShowWorkHours()

If set to true the view will be initially shown in business hours mode. By default view is displayed in full day mode.

Snap(System.Boolean)

If set to true the scheduler will snap events to the nearest slot during dragging (resizing or moving). Set it to false to allow free moving and resizing of events.

Parameters

value - System.Boolean

The value for Snap

StartTime(System.DateTime)

The start time of the week and day views. The scheduler will display events starting after the startTime.

Parameters

value - System.DateTime

The value for StartTime

Timezone(System.String)

The timezone which the scheduler will use to display the scheduler appointment dates. By default the current system timezone is used. This is an acceptable default when the scheduler widget is bound to local array of events. It is advisable to specify a timezone if the scheduler is bound to a remote service. That way all users would see the same dates and times no matter their configured system timezone.The complete list of the supported timezones is available in the List of IANA time zones Wikipedia page.

Parameters

value - System.String

The value for Timezone

Width(System.Double)

The width of the widget. Numeric values are treated as pixels.

Parameters

value - System.Double

The value for Width

WorkDayStart(System.DateTime)

Sets the start of the work day when the "Show business hours" button is clicked.

Parameters

value - System.DateTime

The value for WorkDayStart

WorkDayEnd(System.DateTime)

Sets the end of the work day when the "Show business hours" button is clicked.

Parameters

value - System.DateTime

The value for WorkDayEnd

WorkWeekStart(System.Int32)

The start of working week (index based).

Parameters

value - System.Int32

The value for WorkWeekStart

WorkWeekEnd(System.Int32)

The end of working week (index based).

Parameters

value - System.Int32

The value for WorkWeekEnd

Mobile(Kendo.Mvc.UI.MobileMode)

Defines the mobile modes supported by Kendo UI Scheduler for ASP.NET MVC

Parameters

value - MobileMode

The value for Mobile

Events(System.Action)

Configures the client-side events.

Parameters

configurator - System.Action<SchedulerEventBuilder>

The client events action.

Example


            @(Html.Kendo().Scheduler()
                  .Name("Scheduler")
                  .Events(events => events
                      .Add("onAdd")
                  )
            )

ToComponent()

Returns the internal view component.

Expression(System.String)

Sets the name of the component.

Parameters

modelExpression - System.String

Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

Parameters

modelExplorer - Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer

Name(System.String)

Sets the name of the component.

Parameters

componentName - System.String

The name.

Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with

Parameters

deferred - System.Boolean

HtmlAttributes(System.Object)

Sets the HTML attributes.

Parameters

attributes - System.Object

The HTML attributes.

HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

Parameters

attributes - System.Collections.Generic.IDictionary<String,Object>

The HTML attributes.

Render()

Renders the component in place.

ToHtmlString()

WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

Parameters

writer - System.IO.TextWriter
encoder - System.Text.Encodings.Web.HtmlEncoder

ToClientTemplate()

In this article
Not finding the help you need?