How can we add the Make Recurring/Recurring Appointment form to a Custom Appointment form?

We would like to enable the recurring appointment feature to a custom appointment form. How do we implement this?

Edit:

We can show the recurring appointment form by handling the click event of a new button. We'd like to ask how we can capture the values from this form.

private void btnRecurring_Click(object sender, EventArgs e)
{
            var recurringForm = new RecurringForm();
            recurringForm.ShowDialog();
}

Thank you in advance.

7 Replies 1 reply marked as answer

AR Arulpriya Ramalingam Syncfusion Team June 11, 2020 12:38 AM UTC

Hi Peregrino, 
 
Thank you for your interest in Syncufsion products. 
 
The start and end time of the appointments can be retrieved from your custom appointment when the FormClosing event is occurred. In that event, the values can be assigned to RecurrentAppointment instance to add it in the MasterList of ScheduleDataProvider. Please make use of the below code example. 
Example code 
 
recurringForm.Closing+= new recurringForm_Closing; 
 
private void recurringForm_Closing(object sender, EventArgs e) 
{ 
    IRecurringAppointment item = scheduleDataProvider.NewAppointment(); 
    Item.StartTime = value from the form. 
    Item.EndTime = value from the Form. 
} 
 
Please let us know, if you have any other queries. 
 
Arulpriya 



PE Peregrino June 11, 2020 09:59 AM UTC

Hi Arulpiya,

It looks like the child controls of the RecurringForm control are not exposed. Does that mean we would not be able to reuse the RecurringForm?

Thanks,
Peregrino


AR Arulpriya Ramalingam Syncfusion Team June 15, 2020 12:20 AM UTC

Hi Peregrino, 
 
Thank you for the update. 
 
We already provided a user guide to add RecurrenceAppointment in schedule control with RecurrenceRule. In your custom appointment, you can add a button to add recurrence appointment using recurrence rule. Please make use of the below UG for further details. 
 
 
please get back to us, if you need any further assistance. 
 
Regards, 
Arulpriya 



PE Peregrino June 15, 2020 05:41 AM UTC

Hi Arulpriya,

Thanks for the links. The sample does not seem to show custom provider that implements IRecurringScheduleDataProvider which is I think what we need to properly implement adding of RecurrenceAppointment. Perhaps can you help us how to implement IRecurringScheduleDataProvider?

Regards,
Peregrino



AR Arulpriya Ramalingam Syncfusion Team June 16, 2020 05:57 PM UTC

Hi Peregrino, 
 
Thank you for the update. 
 
We already provided a built-in data provider (ArrayListDataProvider) to load the appointments as recurrence appointment. If your custom data provider is derived from ArrayListDataProvider, the appointments will be added as recurring appointments by default. If it is derived directly from IRecurringScheduleDataProvider, it should also derive from the ScheduleDataProvider class and the appointments should be added into the RecurringList. We already provided a dashboard demo to add recurring appointments for schedule control in which the SimpleScheduleDataProvider is derived from IRecurringScheduleDataProvider interface. Please make use of the below sample and get back to us with some more details, if we misunderstood your requirement. 
 
 
Regards,
Arulpriya
 


Marked as answer

PE Peregrino June 16, 2020 06:31 PM UTC

Hi Arulpriya,

Thank you so much for your help! This is exactly what I needed.

Cheers,
Peregrino


AR Arulpriya Ramalingam Syncfusion Team June 17, 2020 09:21 AM UTC

Hi Peregrino, 
 
Thank you for the update and we are glad that the provided sample and solution helped to achieve your requirement. Please get back to us, if you need any further assistance. 
 
Regards, 
Arulpriya 


Loader.
Up arrow icon