Skip to main content

SchedulerControl.DataSource Property

Gets or sets the data source object for the SchedulerControl. This is a dependency property.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public DataSource DataSource { get; set; }

Property Value

Type Description
DataSource

An object exposing the IDataSourceBase interface (e.g., the DataSource object) that is the Scheduler’s data source.

Remarks

Use the DataSource property to provide the data source and mappings for the scheduler’s appointments, resources, labels and status.

We recommend using the window DataContext to specify bindings to the DataSource object’s properties in XAML.

Example

View Example

<dxsch:SchedulerControl.DataSource>
    <dxsch:DataSource ResourcesSource="{Binding Doctors}" AppointmentsSource="{Binding Appointments}">
        <dxsch:DataSource.ResourceMappings>
            <dxsch:ResourceMappings Caption="Name" Id="Id"/>
        </dxsch:DataSource.ResourceMappings>
        <dxsch:DataSource.AppointmentMappings>
            <dxsch:AppointmentMappings
                                        Type="Type"
                                        StatusId="StatusId"
                                        Start="StartTime"
                                        Subject="PatientName"
                                        ResourceId="DoctorId"
                                        RecurrenceInfo="RecurrenceInfo"
                                        Reminder="ReminderInfo"
                                        LabelId="CategoryId"
                                        Location="Location"
                                        Id="Id"
                                        End="EndTime"
                                        Description="Notes"
                                        AllDay="AllDay">
                <dxsch:CustomFieldMapping Mapping="InsuranceNumber" Name="InsuranceNumber"/>
                <dxsch:CustomFieldMapping Mapping="FirstVisit" Name="FirstVisit"/>
            </dxsch:AppointmentMappings>
        </dxsch:DataSource.AppointmentMappings>
    </dxsch:DataSource>

The following code snippets (auto-collected from DevExpress Examples) contain references to the DataSource property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also