This is a migrated thread and some comments may be shown as answers.

Display dates in Calendar from RadScheuler

3 Answers 37 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 03 Sep 2008, 07:23 AM
Is there a way to display dates from a RadScheduler on a RadCalendar. I've taken a look at the outlook 2007 example at http://demos.telerik.com/ASPNET/Prometheus/Scheduler/Examples/Outlook2007/DefaultCS.aspx

But i don't see how the RadScheduler dates are binded to the RadCalendar.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 03 Sep 2008, 07:32 AM
Hi Richard,

Please check the code behind of the example using the example code viewer. Here is a snippet:
 protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
        {
            RadCalendar1.FocusedDate = RadScheduler1.SelectedDate;
            SyncCalendars();
        }


Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Richard
Top achievements
Rank 1
answered on 03 Sep 2008, 07:44 AM
I see how it sets the selected date, but how does it set appointments from the RadScheduler onto the RadCalendar eg. reoccuring appointments.
0
Peter
Telerik team
answered on 03 Sep 2008, 03:15 PM
Hello Richard,

Could you please be more specific what exactly you need to achieve? The AppointmentCreated event fires for all visible appointments in RadScheduler. Have you considered using this event to set special days for RadCalendar from code-behind?

The Outlook 2007 example uses the AppointmentDataBound event to set the special days for RadCalendar.
protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)  
        {  
            RadCalendarDay radCalendarDay = new RadCalendarDay(this.RadCalendar1);  
            radCalendarDay.Date = e.Appointment.Start;  
            radCalendarDay.ItemStyle.CssClass = "DayWithAppointments";  
            RadCalendar1.SpecialDays.Add(radCalendarDay);  
            RadCalendar2.SpecialDays.Add(radCalendarDay);  
            RadCalendar3.SpecialDays.Add(radCalendarDay);  
        }  
 

However, you can use RadScheduler's DataBound event to enumerate all appointments (including occurrences) as shown in this kb article.




Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Richard
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Richard
Top achievements
Rank 1
Peter
Telerik team
Share this question
or