Back to Devexpress

FetchDataEventArgs.Result Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-fetchdataeventargs.md

latest3.6 KB
Original Source

FetchDataEventArgs.Result Property

Specifies the list of scheduler items to load from the data source.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public object[] Result { get; set; }
vb
Public Property Result As Object()

Property Value

TypeDescription
Object[]

The list of appointments to load.

|

Remarks

The Result property accepts both data objects and scheduler items.

To pass data objects to the Result property, set the DataSource.FetchMode property to Bound. Specify the AppointmentMappings/TimeRegionMappings property and map the Id. See the Mappings topic for more information.

To pass scheduler items to the Result property, set the DataSource.FetchMode property to Unbound. If the DataSource.FetchMode property is set to Unbound and the AppointmentMappings property does not return null, an exception is thrown.

If you want to implement the asynchronous data load, use the AsyncResult property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Result 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.

wpf-scheduler-load-data-on-demand/CS/Shared/Views/SchedulingView.xaml.cs#L25

csharp
await e.AsyncResult;
int apptCount = e.Result != null ? e.Result.Length : e.AsyncResult.Result.Length;
var intervalStr = e.Interval.ToString("({0:d})-({1:d})", null);

wpf-scheduler-load-data-on-demand/VB/Shared/Views/SchedulingView.xaml.vb#L30

vb
If e.AsyncResult IsNot Nothing Then Await e.AsyncResult
Dim apptCount As Integer = If(e.Result IsNot Nothing, e.Result.Length, e.AsyncResult.Result.Length)
Dim intervalStr = e.Interval.ToString("({0:d})-({1:d})", Nothing)

See Also

FetchDataEventArgs Class

FetchDataEventArgs Members

DevExpress.Xpf.Scheduling Namespace