Hello,
I am attempting to display the appointments created by a radscheduler on the radcalendar (simply by highlighting the day on the calendar and populating the tooltip). It appears that there is no clear way to integrate the scheduler with the calendar. The reason this is difficult is because of the recurring requests. The radscheduler receives a pattern and does all the work for you. To highlight the days on a radcalendar, I don't want to have to parse the pattern myself. My idea was...to create an invisible radscheduler, populate it, and in some appointment rendering event, create a list of appointments to display in the calendar. So far my problem is, I can't find the right event...radSched_AppointmentDataBound does not fire for every appointment in a recurrence, just the first run. Below is an example of what I was attempting in the AppointmentDataBound event.
protected void radSched_AppointmentDataBound(object sender, SchedulerEventArgs e)
{
RadCalendarDay rcd = new RadCalendarDay();
CalendarEventItems cei;
rcd.Date = e.Appointment.Start;
rcd.ToolTip = e.Appointment.Subject;
rcd.ItemStyle.BackColor = System.Drawing.Color.Red;
if (DateTime.Now < rcd.Date)
{
cei = new CalendarEventItems();
cei.EventStartDateTime = e.Appointment.Start;
cei.EventName = e.Appointment.Subject;
cei.EventEndDateTime = e.Appointment.End;
cei.EventDescription = e.Appointment.Description;
lsUpcomingEvents.Add(cei);
}
radCal.SpecialDays.Add(rcd);
}
Is there a different event or strategy I can use to grab each appointment for a given month? Is there some other way I can integrate the radscheduler into a radcalendar? Somebody else has had to have had this idea before...