RadCalendar and Radscheduler synchronization

4 posts, 0 answers
  1. hema
    hema avatar
    16 posts
    Member since:
    Mar 2011

    Posted 12 Jul 2011 Link to this post

    Hi,

                  I have created a user control say ctlSchedular(along with RadSchedulerNavigator).And i am loading ctlSchedular  in a form say Form1 ,in that Form1 i have a Radpageview with outlook mode with 2 pages. In the 2nd page i have a RadCalendar .

    Now i need a sync between calendar and schedular ...

    1)If i click  on the forward navigator button on the RadSchedulerNavigator then the date on the calender should change.

    2)If i click  some date in the Radcalendar then date in the schedular should change .

    How can i do this .can anyone please explain it.

    Thanks
    Hema
  2. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 14 Jul 2011 Link to this post

    Hi Hema,

    Thank you for your question.

    You can achieve this by subscribing to the RadScheduler's active view PropertyChanged event and RadCalendar's SelectionChanged event. Below is a code snippet that demonstrates this:
    private void Form1_Load(object sender, EventArgs e)
    {
        this.radScheduler1.ActiveView.PropertyChanged += new PropertyChangedEventHandler(ActiveView_PropertyChanged);
        this.radCalendar1.SelectionChanged += new EventHandler(radCalendar1_SelectionChanged);
    }
     
    void ActiveView_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "StartDate")
        {
            this.radCalendar1.SelectionChanged -= new EventHandler(radCalendar1_SelectionChanged);
            this.radCalendar1.SelectedDate = this.radScheduler1.ActiveView.StartDate;
            this.radCalendar1.FocusedDate = this.radScheduler1.ActiveView.StartDate;
            this.radCalendar1.SelectionChanged += new EventHandler(radCalendar1_SelectionChanged);
        }
    }
     
    void radCalendar1_SelectionChanged(object sender, EventArgs e)
    {
        if (this.radCalendar1.SelectedDates.Count > 0)
        {
            this.radScheduler1.ActiveView.PropertyChanged -= new PropertyChangedEventHandler(ActiveView_PropertyChanged);
            this.radScheduler1.ActiveView.StartDate = this.radCalendar1.SelectedDate;
            this.radScheduler1.ActiveView.PropertyChanged += new PropertyChangedEventHandler(ActiveView_PropertyChanged);
        }
    }

    You can find a sample project in the support ticket you have opened.

    Hope this helps. Feel free to ask if you have any additional questions.

    Greetings,
    Ivan Todorov
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Pankaj
    Pankaj avatar
    2 posts
    Member since:
    Feb 2013

    Posted 14 Feb 2013 Link to this post

    Urgent Help Required !!!

    I have used telerik calender in my application and now i want to sync them with Google Calendar, Outlook, my iCal. 

    I am unable to perform this task, please do help me. I have search this in many website but i didn't found any help 

    Thanks in Advance 

    Pankaj Tiwari 
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 15 Feb 2013 Link to this post

    Hello Pankaj,

    Thank you for writing.

    I am not sure how you can achieve an actual "sync" between all these platforms as this depends on the way they are implemented and the API they provide. This is outside of our scope and I am not able to answer that question. However, I think most of these platforms support the iCalendar format which is also supported by RadScheduler: http://www.telerik.com/help/winforms/scheduler-importing-and-exporting-appointments-export-to-icalendar.html. Using this format you can export and import appointment between the different platforms.

    I hope you find this useful. Feel free to ask if you have any other questions.

    Greetings,
    Ivan Todorov
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top