Opening DeleteRecurringAppointmentDialog from code

3 posts, 1 answers
  1. Patrick
    Patrick avatar
    43 posts
    Member since:
    Aug 2018

    Posted 04 Dec 2019 Link to this post

    Hello,

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

    Best regards

    Patrick Vossen

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3988 posts

    Posted 04 Dec 2019 Link to this post

    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.
  3. Patrick
    Patrick avatar
    43 posts
    Member since:
    Aug 2018

    Posted 05 Dec 2019 in reply to Dess | Tech Support Engineer, Sr. Link to this post

    Hi Dess,

    Thanks 4 the solution

    Best regards

    Patrick Vossen

     

Back to Top