Display dates in Calendar from RadScheuler

4 posts, 0 answers
  1. Richard
    Richard avatar
    2 posts
    Member since:
    May 2008

    Posted 03 Sep 2008 Link to this post

    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.
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 03 Sep 2008 Link to this post

    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.
  3. Richard
    Richard avatar
    2 posts
    Member since:
    May 2008

    Posted 03 Sep 2008 Link to this post

    I see how it sets the selected date, but how does it set appointments from the RadScheduler onto the RadCalendar eg. reoccuring appointments.
  4. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 03 Sep 2008 Link to this post

    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.
Back to Top