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

RadCalendar and Radscheduler synchronization

3 Answers 241 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
hema
Top achievements
Rank 1
hema asked on 12 Jul 2011, 07:44 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 14 Jul 2011, 10:04 AM
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!

0
Pankaj
Top achievements
Rank 1
answered on 14 Feb 2013, 07:27 PM
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 
0
Ivan Todorov
Telerik team
answered on 15 Feb 2013, 02:18 PM
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.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
hema
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Pankaj
Top achievements
Rank 1
Share this question
or