BootstrapSchedulerBuilderBase<T>.BindResources(Object) Method
Binds the Scheduler’s resources to the specified resource collection.
Namespace: DevExpress.AspNetCore.Bootstrap
Assembly: DevExpress.AspNetCore.Bootstrap.v18.2.dll
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
data |
Object | An collection of resources. |
#Returns
Type | Description |
---|---|
T | A reference to this instance after the operation is completed. |
#Remarks
IMPORTANT
Bootstrap Controls for ASP.
$1
Pass a collection of resource data objects to the BindResources method to provide resource data to the scheduler.
@model EditableMedicsDataContext
@(Html.DevExpress()
.BootstrapScheduler<MedicalAppointment, Medic>("scheduler1")
.Storage(storage => storage
.Appointments(appointments => appointments
.Mappings(map => map
.ResourceId(a => a.MedicId)
.AppointmentId(a => a.ID)
.Start(a => a.StartTime)
.End(a => a.EndTime)))
.Resources(resources => resources
.Mappings(map => map
.ResourceId(r => r.ID)
.Caption(r => r.DisplayName))))
.BindAppointments(Model.GetAppointments())
.BindResources(Model.GetMedics())
.Routes(routes => routes
.MapRoute(r => r
.Controller("Scheduler")
.Action("DataBinding"))))
Note that to allow the Scheduler control to save and retrieve resource data to/from the data source, you also need to specify at least the following mandatory data field mappings: