New to Telerik UI for WinForms? Start a free 30-day trial
Loading Data for Selected Day Only
Updated over 6 months ago
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.
-
Listen for a change in the StartDate property of the ActiveView
-
Subscribe for the PropertyChanged event of the ActiveView
-
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:
C#
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
}
}