The requested page is not available for the requested platform. You are viewing the content for Default platform.

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

public T BindResources(
    object dataObject
)
Public Function BindResources(
    dataObject As Object
) As T

Parameters

Name Type Description
dataObject 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.NET Core are in maintenance mode. We don’t add new controls or develop new functionality for this product line. Our recommendation is to use the ASP.NET Core Controls suite.

$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:

See Also