Back to Devexpress

DataSource Class

maui-devexpress-dot-maui-dot-scheduler-de885848.md

latest3.5 KB
Original Source

DataSource Class

Specifies data sources and mappings for the scheduler’s appointments, labels, and statuses.

Namespace : DevExpress.Maui.Scheduler

Assembly : DevExpress.Maui.Scheduler.dll

NuGet Package : DevExpress.Maui.Scheduler

Declaration

csharp
public class DataSource :
    SchedulerElement,
    IDataSource

The following members return DataSource objects:

Remarks

To bind a scheduler view to an external data source, set the view’s DataStorage property to a SchedulerDataStorage object and assign a DataSource object to the SchedulerDataStorage.DataSource property.

Use the AppointmentsSource, AppointmentLabelsSource and AppointmentStatusesSource properties to specify data sources for appointments, labels and statuses.

Note

The Scheduler allows you to delete only one item at a time.

Important

Each binding requires a corresponding mapping. Use the AppointmentMappings, AppointmentLabelMappings and AppointmentStatusMappings properties to map properties of appointment, label and status objects to data source fields.

Example

This example shows how to bind a DayView instance to a data source that stores custom appointment ( MedicalAppointment ) and label ( MedicalAppointmentType ) objects.

  1. Assign a view model object to the content page’s BindingContext property.
  2. Set the DayView.DataStorage property to a SchedulerDataStorage object.
  3. Set the SchedulerDataStorage.DataSource property to a DataSource object and specify the following properties of this object:

Implements

INotifyPropertyChanged

IElementController

Inheritance

System.Object BindableObject Element DevExpress.Maui.Core.Internal.DXElementBaseCore DevExpress.Maui.Scheduler.Internal.SchedulerElement DataSource

Extension Methods

Yield<DataSource>()

YieldIfNotNull<DataSource>()

See Also

DataSource Members

DevExpress.Maui.Scheduler Namespace