Delete Series with confirmation

3 posts, 1 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 05 Aug 2014 Link to this post

    Hi,

    I'm handling series without exceptions.
    So in other words - the user always edits the whole series (or a single appointment if no recurrence is defined).

    I found a thread here how to suppress the "Series or single appointment" dialog on editing.
    It suppresses the dialog - and shows the edit form for series - this is fine, but it also suppresses the delete confirmation.

    I found out how to "filter between edit and delete" - but I have no idea how to go on.
    What I want is a "normal" confirmation dialog "Do you want to delete the series"???

    Here my code so far....
    function RecurrenceActionDialogShowingHandler(sender, args) {
     
        if (args._recurrenceAction == 1) {
            args.set_cancel(true);
        }
        //Edit this instance only: 
        //args.set_editSeries(false); 
     
        //Edit the entire series: 
        args.set_editSeries(true);
    }

    It suppresses the selection for edit - but shows it for delete.

    Manfred
  2. Answer
    Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 07 Aug 2014 Link to this post

    Hello Manfred,

    Here is the code that worked correctly at my side:
    function recurrenceActionDialogShowingHandler(sender, args) {
                   
                   if (args._recurrenceAction == 1) {
                       args.set_cancel(true);
                       args.set_editSeries(true);
                   }
                   if (args._recurrenceAction == 2) {
                       args.set_cancel(true);
     
                       if (confirm("Do you want to delete the series?")) {
                           args.set_editSeries(true);
                       }
                   }
               }

    Hope this will help you solve the issue. 

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 07 Aug 2014 in reply to Plamen Link to this post

    Hello Plamen,

    works like a charm :)

    Perfect support as always at telerik!

    Thank you
    Manfred
Back to Top