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

Opening DeleteRecurringAppointmentDialog from code

2 Answers 76 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 04 Dec 2019, 03:06 PM

Hello,

Is there a simple way to open the DeleteRecurringAppointmentDialog? Just like adding an appointment with AddNewAppointmentWithDialog?

Best regards

Patrick Vossen

2 Answers, 1 is accepted

Sort by
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Dec 2019, 03:44 PM

Hello, Patrick, 

Usually, if you try to delete an occurrence of a recurring appointment, the DeleteRecurringAppointmentDialog is shown. The easiest way to show the dialog is to call the SchedulerUIHelper.DeleteAppointment passing an occurrence of master event:

        public RadForm1()
        {
            InitializeComponent();
            DateTime startDate = DateTime.Now;
            Appointment recurringAppointment = new Appointment(startDate,
                TimeSpan.FromHours(1.0), "Appointment Subject");    
            HourlyRecurrenceRule rrule =
                new HourlyRecurrenceRule(recurringAppointment.Start, 2, 10); 
            recurringAppointment.RecurrenceRule = rrule;
            radScheduler1.Appointments.Add(recurringAppointment);
        }

        private void radButton1_Click(object sender, EventArgs e)
        { 
            SchedulerUIHelper.DeleteAppointment(this.radScheduler1.Appointments[0].Occurrences.First(), this.radScheduler1);
        }

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Patrick
Top achievements
Rank 1
answered on 05 Dec 2019, 03:01 PM

Hi Dess,

Thanks 4 the solution

Best regards

Patrick Vossen

 

Tags
Scheduler and Reminder
Asked by
Patrick
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Patrick
Top achievements
Rank 1
Share this question
or