We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Add Recurring Appointment

Thread ID:

Created:

Updated:

Platform:

Replies:

127120 Oct 27,2016 04:15 AM Oct 28,2016 10:44 AM Windows Forms 2
loading
Tags: ScheduleControl
mike
Asked On October 27, 2016 04:15 AM

How do I add a recurring appointment on the schedule control programatically?
I am able to add non recurring appointments on the control but I can't seem to add a recurring one.

Thanks in advance !



mike
Replied On October 27, 2016 04:15 AM

By the way I'm using C#

Adhikesevan Kothandaraman [Syncfusion]
Replied On October 28, 2016 10:44 AM

Hi Mike,  

Thanks for using Syncfusion product. 

To add the multi span day appointment in a schedule control, you can use the AddSpanAppointment method. Please refer to the following code snippet to add the multi span day appointment in schedule control,  
 
Code Snippet:  
ArrayListDataProvider dataprovider = new Syncfusion.Schedule.ArrayListDataProvider();  
IScheduleAppointment appointment = dataprovider.NewScheduleAppointment();        
  
appointment = dataprovider.NewScheduleAppointment();  
appointment.StartTime = DateTime.Now;  
appointment.EndTime = DateTime.Now.AddDays(4);  
appointment.AllDay = true;  
appointment.Subject = "Leave";  
appointment.LabelValue = 1;  
appointment.AllowResize = false;  
appointment.AllowDrag = false;  
  
//Convert the appointment as the recurrence schedule appointment   
IRecurringScheduleAppointment recurrenceAppointment = appointment as IRecurringScheduleAppointment;       
//Add the multi-span day appointment to the schedule control  
this.scheduleControl1.AddSpanAppointment(recurrenceAppointment, dataprovider);  
this.scheduleControl1.DataSource = dataprovider;  

Sample: 

Regards, 
Adhi 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;