Load on Demand
This article demonstrates how you can load the appointments in RadScheduler depending on the current visible range of the control. This can be very useful in scenarios where the number of appointments is very large.
There are two possible approaches to accomplish this:
1. Using the VisibleRangeChanged event.
2. Using the VisibleRangeChangedCommand and VisibleRangeChangedCommandParameter properties. This approach is effective if you wish to load the visible appointments in an MVVM-friendly manner.
Using the VisibleRangeChanged Event
To accomplish this approach, you only need to handle the VisibleRangeChanged and create a helper method to get the appointments for a particular DateSpan. Please note that you need to start with an initial collection of appointments.
Example 1: Handling the VisibleRangeChanged event
Using the VisibleRangeChangedCommand
Alternatively, if you want to follow the MVVM pattern, you can create an appropriate command in your viewmodel and set it as the VisibleRangeChangedCommand of the RadScheduler control.
For example, you can define your viewmodel as shown in Example 2.