Deleting recurring appointment through contextmenu

5 posts, 1 answers
  1. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 07 Aug 2009 Link to this post

    Hello!

    I was just wondering why I get a "Deleting a recurring appointment"-box when I use the little X-icon for deleting the recurring appointment in Scheduler / RadScheduler Context Menu , but not when I delete the appointment through the contextmenu? Would it be possible to also display this messagebox?

    Thanks in advance,

    Bart
  2. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 07 Aug 2009 Link to this post

    Hi Bart,

    With Q2 2009 we introduced a new client method - deleteAppointmentWithConfirmation
    http://www.telerik.com/products/aspnet-ajax/whats-new/release-history/q2-2009-version-2009-2-701.aspx

    So you can try:
    if (text == "Delete")  
    {  
       scheduler.deleteAppointmentWithConfirmation(selectedAppointment, true);  



    All the best,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 07 Aug 2009 Link to this post

    Dear Peter,

    Thanks!

    That was the answer i was looking for.

    Greetings,

    Bart
  5. Datamex
    Datamex avatar
    161 posts
    Member since:
    Jun 2012

    Posted 10 Aug 2009 Link to this post

    Dear Peter,

    The client method deleteAppointmentWithConfirmation is working fine.

    But i ran into another problem.

    I also use the context menu to edit an appointment, so i would like to use the client method editAppointmentWithConfirmation for this.
    Now i'm using a RadWindow to insert and Edit an appointment. This means i have to write the following lines of code to open the RadWindow when editing.

     

    var oWindow = $find('<%= AppointmentWindow.ClientID %>');  
     
    oWindow.setUrl("AppointmentDetails.aspx?AppointmentID=" + appointmentID);  
    oWindow.set_title("Edit Appointment...");  
    oWindow.show(); 

    I discovered that there is an client side event that fires after the RecurrenceActionDialog is closed: ClientRecurrenceActionDialogClosed. I use this event to open the radwindow manually when the appointment is recurring.

    But when the appointment is not recurring, is there a client side event that i can use to open the radwindow manually?

    Thanks is advance,

    Bart

  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 10 Aug 2009 Link to this post

    Hello Bart,

    You can distinguish recurring from non recurring appoitnments using the client API. For example:
     function OnClientAppointmentContextMenu(sender, eventArgs)   
            {              
                if (eventArgs.get_appointment().get_recurrenceState() == Telerik.Web.UI.RecurrenceState.NotRecurring)   
                    alert("appointment is not recurring");  
                    else 
                    alert("appointment is recurring");              
            } 


    Regards,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017