Kendo.Mvc.UI.Fluent.SchedulerBuilder
Defines the fluent API for configuring the Kendo UI Scheduler
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 (Razor)
@(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 (Razor)
@(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 (Razor)
@(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 (Razor)
@(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 (Razor)
@(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<T>)
Binds the scheduler to a list of objects
Parameters
dataSource System.Collections.Generic.IEnumerable<T>
The data source.
Example (ASPX)
@model IEnumerable<Task>
<%@Page Inherits="System.Web.Mvc.ViewPage<IEnumerable<Task>>" %>
<: Html.Kendo().Scheduler<Task>()
.Name("Scheduler")
.BindTo(Model)
.DataSource(dataSource => dataSource
.Model(m => m.Id(f => f.TaskID))
)>
Example (Razor)
@model IEnumerable<Task>
@(Html.Kendo().Scheduler<Task>()
.Name("Scheduler")
.BindTo(Model)
.DataSource(dataSource => dataSource
.Model(m => m.Id(f => f.TaskID))
))
DataSource(System.Action<Kendo.Mvc.UI.Fluent.SchedulerAjaxDataSourceBuilder<T>>)
Configures the DataSource options.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.SchedulerAjaxDataSourceBuilder>
The DataSource configurator action.
Example (ASPX)
<%= Html.Kendo().Scheduler<Task>()
.Name("Scheduler")
.DataSource(source =>
{
source.Read(read =>
{
read.Action("Read", "Scheduler");
});
})
%>
Toolbar(System.Action<Kendo.Mvc.UI.Fluent.SchedulerToolbarFactory<T>>)
Adds PDF command to the toolbar.
Example (Razor)
@(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
Editable(System.Action<Kendo.Mvc.UI.Fluent.SchedulerEditableSettingsBuilder<T>>)
Sets the editing configuration of the scheduler.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.SchedulerEditableSettingsBuilder>
The lambda which configures the editing
Example (Razor)
@(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 (Razor)
@(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<Kendo.Mvc.UI.Fluent.SchedulerGroupBuilder>)
Sets the resources grouping configuration of the scheduler.
Parameters
configuration System.Action<Kendo.Mvc.UI.Fluent.SchedulerGroupBuilder>
The lambda which configures the scheduler grouping
Example (Razor)
@(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<Kendo.Mvc.UI.Fluent.SchedulerResourceFactory<T>>)
Sets the resources configuration of the scheduler.
Parameters
addResourceAction System.Action<Kendo.Mvc.UI.Fluent.SchedulerResourceFactory>
The lambda which configures the scheduler resources
Example (Razor)
@(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<Kendo.Mvc.UI.Fluent.SchedulerViewFactory<T>>)
Sets the views configuration of the scheduler.
Parameters
addViewAction System.Action<Kendo.Mvc.UI.Fluent.SchedulerViewFactory>
The lambda which configures the scheduler views
Example (Razor)
@(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<Kendo.Mvc.UI.Fluent.SchedulerCurrentTimeMarkerSettingsBuilder<T>>)
If set to false the "current time" marker of the scheduler would not be displayed.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.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<Kendo.Mvc.UI.Fluent.SchedulerFooterSettingsBuilder<T>>)
If set to false the footer of the scheduler would not be displayed.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.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<Kendo.Mvc.UI.Fluent.SchedulerMessagesSettingsBuilder<T>>)
The configuration of the scheduler messages. Use this option to customize or localize the scheduler messages.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.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 " ".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 " ".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<Kendo.Mvc.UI.Fluent.SchedulerPdfSettingsBuilder<T>>)
Configures the Kendo UI Scheduler PDF export settings.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.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 Kendo.Mvc.UI.MobileMode
The value for Mobile
Events(System.Action<Kendo.Mvc.UI.Fluent.SchedulerEventBuilder>)
Configures the client-side events.
Parameters
configurator System.Action<Kendo.Mvc.UI.Fluent.SchedulerEventBuilder>
The client events action.
Example (ASPX)
@(Html.Kendo().Scheduler()
.Name("Scheduler")
.Events(events => events
.Add("onAdd")
)
)