BuilderFactoryExtensions.BootstrapScheduler<TAppointment>(BuilderFactory, String) Method

Creates a strongly-typed Scheduler control with a specified name.

Namespace: DevExpress.AspNetCore

Assembly: DevExpress.AspNetCore.Bootstrap.v18.1.dll

Syntax

public static BootstrapSchedulerBuilder<TAppointment> BootstrapScheduler<TAppointment>(this BuilderFactory builderFactory, string name)

Parameters

Type Name Description
BuilderFactory builderFactory

A BuilderFactory object providing access to Scheduler settings.

String name

A control name.

Returns

Type Description
BootstrapSchedulerBuilder<TAppointment>

A builder for a Scheduler control.

Type Parameters

Name Description
TAppointment

An appointment type.

The code sample below demonstrates how you can use this method to create a Scheduler control.

@model IEnumerable<TODOTask>

@(Html.DevExpress()
    .BootstrapScheduler<TODOTask>("schedulerDataBinding")
    .Start(new DateTime(2018, 05, 21))
    .Storage(storage => storage
        .Appointments(appointments => appointments
            .Mappings(map => map
                .AppointmentId(a => a.Id)
                .Subject(a => a.Text)
                .Start(a => a.StartDate)
                .End(a => a.EndDate))
    )))
    .Routes(routes => routes
        .MapRoute(r => r
            .Action("DataBinding")
            .Controller("Scheduler")))
    .BindAppointments(Model))