Can you customize reccuring appointments edit popup?

8 posts, 0 answers
  1. Petter Forss
    Petter Forss avatar
    21 posts
    Member since:
    Oct 2009

    Posted 13 Nov 2012 Link to this post

    I wanted to implement a third option for when you open want to open a recurring appointment in a series.

    Normally the options you get is

    Edit the whole series
    or
    Edit just this one appointment.

    What i'm looking for is a third option that goes something like

    Edit the series starting from here

    Which would bascially split the series up into two, leaving everything behind the selected appointment unchanged, but changes ever appointment thereafter. So that if your standing weekly wednsday appointment suddenly gets moved to a thursday after a few months, u can simply just edit the series u already have by this option, instead of cutting one out to start a new equal.



    Thanks
  2. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 13 Nov 2012 Link to this post

    Hello Petter,

     
    One way to achieve this is to cancel the OnClientRecurrenceActionDialogShowing client event of RadScheduler and implement your custom pop up showing instead of the inbuilt one.

    Hope this will be helpful.

    All the best,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Petter Forss
    Petter Forss avatar
    21 posts
    Member since:
    Oct 2009

    Posted 19 Nov 2012 Link to this post

    Can you get the code for the default dialog somewhere?
  4. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 19 Nov 2012 Link to this post

    Hi,

    You can use the set_cancel method as shown below.
    JS:
    function OnClientRecurrenceActionDialogShowing (sender,eventArgs)
    {
     evenrArgs.set_cancel() (true);
    }

    Thanks,
    Princy.
  5. Petter Forss
    Petter Forss avatar
    21 posts
    Member since:
    Oct 2009

    Posted 19 Nov 2012 Link to this post

    I meant the code for the default dialog so i can customize it to what I need?
  6. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 21 Nov 2012 Link to this post

    Hi Petter,

     
    Unfortunately there is not such isolated code of the Modal Pop up so I would recommend you to use the client events and show our RadWindow in a similar way as it is used in this demo.

    Kind regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Petter Forss
    Petter Forss avatar
    21 posts
    Member since:
    Oct 2009

    Posted 22 Nov 2012 Link to this post

    Ok,

    I figured out the new window part..

    However I now want to send some kind of paramter to Advanced Form so I know how to handle this third option..

    But I can't get my attributes so stick..

    function OnClientRecurrenceActionDialogShowing(sender, eventArgs) {
        OpenEditSeries(eventArgs.get_appointment());
        eventArgs.set_cancel(true);


      
    function OnClientClose(oWnd, args) {
             //get the transferred arguments
             var arg = args.get_argument();
             if (arg) {
                 var apt = arg.apt;
                 if (arg.selection == 1) {
                     getRadScheduler().showAdvancedEditForm(apt, false);
                 }
                 if (arg.selection == 2) {
                     getRadScheduler().showAdvancedEditForm(apt, true);
                 }
                 //third new option
                 if (arg.selection == 3) {
                     apt.get_attributes().setAttribute("anders", "andersherp");
                     alert(apt.get_attributes().getAttribute("anders"));
                     getRadScheduler().showAdvancedEditForm(apt, true);
                 }
             }
         }
    when arg.selection == 3 i want to tell my AdvancedEditForm that im in special mode,

    so i'm trying to add a attribute to my apt object.

    However..

    When population..

     
    populate: function (apt, isInsert) {
            if (!this._clientMode) {
                this._initializeClientMode();
            }
     
            $find(this._templateId + "_tabstrip").set_selectedIndex(0);
            var aptStarttime = apt.get_start();
            var aptEndtime = apt.get_end();
            alert(apt.get_attributes().getAttribute("anders"));

    My attribute is gone :/

    is there any way to send parameters or attributes to the advanced edit form?
  8. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 27 Nov 2012 Link to this post

    Hello Petter,

     
    This behavior is expected because as it explained in this help topic all the other setters (besides set_subject(), set_start() and set_end()) can update the appointment only in case of WebService binding where there is no postback and the onClientAppointmentDataBound is fired.

    One possible solution for your case that I could think of it to set parameters to different fields in the Advanced form in the OnClientFormCreated event as it is shown in this help topic.

    Hope this will explain the issue and be helpful.

    Kind regards,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top