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

SchedulerResourceBuilder

Methods

Title(System.String)

Parameters

title - System.String

Multiple(System.Boolean)

Parameters

isMultiple - System.Boolean

Name(System.String)

Parameters

value - System.String

BindTo(System.Collections.IEnumerable)

Binds the scheduler resource to a list of objects

Parameters

dataSource - System.Collections.IEnumerable

The dataSource

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .Views(views =>
                {
                    views.DayView();
                    views.AgendaView();
                })
                .Resources(resource =>
                {
                    resource.Add(m => m.OwnerID)
                        .Title("Owner")
                        .Multiple(true)
                        .DataTextField("Text")
                        .DataValueField("Value")
                        .BindTo(new[] { 
                            new { Text = "Alex", Value = 1, color = "red" } ,
                            new { Text = "Bob", Value = 1, color = "green" } ,
                            new { Text = "Charlie", Value = 1, color = "blue" } 
                        });
                })
                .DataSource(d => d
                    .Model(m => m.Id(f => f.TaskID))
                        .Read("Read", "Scheduler")
                        .Create("Create", "Scheduler")
                        .Destroy("Destroy", "Scheduler")
                        .Update("Update", "Scheduler")
                )
            )

DataValueField(System.String)

Parameters

field - System.String

DataTextField(System.String)

Parameters

field - System.String

DataColorField(System.String)

Parameters

field - System.String

DataParentValueField(System.String)

Parameters

field - System.String

ValuePrimitive(System.Boolean)

Parameters

valuePrimitive - System.Boolean

DataSource(System.Action)

Configures the DataSource options.

Parameters

configurator - System.Action<ReadOnlyDataSourceBuilder>

The DataSource configurator action.

Example


            @(Html.Kendo().Scheduler<Kendo.Mvc.Examples.Models.Scheduler.Task>()
                .Name("scheduler")
                .Date(new DateTime(2013, 6, 13))
                .Views(views =>
                {
                    views.DayView();
                    views.AgendaView();
                })
                .Resources(resource =>
                {
                    resource.Add(m => m.OwnerID)
                        .Title("Owner")
                        .Multiple(true)
                        .DataTextField("Text")
                        .DataValueField("Value")
                        .DataSource(d => d.Read("Attendies", "Scheduler"));
                })
                .DataSource(d => d
                    .Model(m => m.Id(f => f.TaskID))
                        .Read("Read", "Scheduler")
                        .Create("Create", "Scheduler")
                        .Destroy("Destroy", "Scheduler")
                        .Update("Update", "Scheduler")
                )
            )

In this article
Not finding the help you need?