Edit this page

Loading Data for Selected Day Only

The article provides an example how data for the selected day when loading RadScheduler up from code, i.e. load the data when the user is switching days on the scheduler.
1. Listen for a change in the StartDate property of the ActiveView

  1. Subscribe for the PropertyChanged event of the ActiveView

  2. Check in it whether the StartDate property has changed. If the PropertyName property of the argument is the name of the StartDate property, load the data:

public LoadingData()
{
    InitializeComponent();
    this.radScheduler1.ActiveView.PropertyChanged += new PropertyChangedEventHandler(ActiveView_PropertyChanged);
}
void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
    if (e.PropertyName == "StartDate")
    {
        //load the data here
    }
}

Public Sub New()
    InitializeComponent()
    AddHandler Me.RadScheduler1.ActiveView.PropertyChanged, AddressOf ActiveView_PropertyChanged
End Sub
Sub ActiveView_PropertyChanged(ByVal sender As Object, ByVal e As PropertyChangedEventArgs)
    'load the data here
    If e.PropertyName = "StartDate" Then
    End If
End Sub

See Also