Editing Recurring Appointents

15 posts, 0 answers
  1. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 31 Aug 2011 Link to this post

    I am having an issue when trying to edit recurring appointments. Well actually only when selecting "Edit only this occurrence" option. The issue is that the AdvancedEdit form does not show up when I select this option. It does show up fine if I chose "Edit the series" option. Am I supposed to create a brand new form for that purpose? If yes, what Container.Mode should be used in this case? Also, after I am done editing the occurrence, what data should be saved to the database? Will that be considered an exception? Thanks
  2. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 01 Sep 2011 Link to this post

    Hi Ilya,

    When you click on the "Edit only this occurence ..." option the Advanced Edit Form should appear so that you will be able to edit only this single appointment. After pressing "Save" you will create an exception of the occurence. I am wondering why the advanced form didn't appears on your side. Could you please show me the RadScheduler settings so I can inspect it and help you?

    Best wishes,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 01 Sep 2011 Link to this post

    Are these the settings you are interested in?

    <telerik:RadScheduler ID="radSchedule1" runat="server" Height="100%"
       MinutesPerRow="15" Skin="Web20" StartInsertingInAdvancedForm="True" StartEditingInAdvancedForm="True"
       AdvancedForm-Modal="True" AdvancedForm-Width="400px" TimelineView-GroupBy="Pract"
       TimelineView-GroupingDirection="Vertical" FirstDayOfWeek="Monday" SelectedView="WeekView"
       Localization-HeaderWeek="Work Week">
    <ResourceTypes>
       <telerik:ResourceType KeyField="PractId" Name="Pract" TextField="Name" ForeignKeyField="PractId" DataSourceID="sqlPract" />
    </ResourceTypes>
    <AdvancedInsertTemplate>
    ...
    </AdvancedInsertTemplate>
    <AdvancedEditTemplate>
    ...
    </AdvancedEditTemplate>
  4. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 01 Sep 2011 Link to this post

    Also, when I create an exception, should the old appointment be shown? For example I have rec appointments that occur on Fridays at 11AM. When I drag and drop one of the occurrences to a brand new day and time (Wednesday for example) the new appointment shows up but the old one on Friday also is showing up. When I drag-and-drop in the RecurrenceExceptionCreated event I create a new exception and update master appointment's recurrence rule with the new rule containing date and time of the exception occurrence and in the new exception appointment I reference DataRecurrenceParentKeyField of the master appointment. What am I doing wrong? Thanks
  5. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 06 Sep 2011 Link to this post

    Bump
  6. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 07 Sep 2011 Link to this post

    Hi Ilya,

    As the 5th and 6th of September are National holidays in Bulgaria and I wasn't at work.

    I took a look at the RadScheduler settings that you sent me but I didn't noticed anything disturbing. Could you please open new support thread and send me your whole project so I can inspect it and help you?

    Thank you!

    Kind regards,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  7. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 07 Sep 2011 Link to this post

    Veronika, can you check ticket # 455364. You will be able to find the sample site there.
  8. Veronica
    Admin
    Veronica avatar
    1213 posts

    Posted 08 Sep 2011 Link to this post

    Hi Ilya,

    My colleague Plamen answered you in the Support thread.

    For all those who follow the forum post - it was an issue of assigning ConnectionString and SelectCommand values to a SqlDataSource control added late in code.

    Regards,
    Veronica Milcheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  9. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 08 Sep 2011 Link to this post

    Veronika,

    I don't think those 2 issues are related. I've tried not to assign the connection string and select statement in code-behind and still unable to open "Edit this occurrence only" edit form. For now I've decided to suppress the popup altogether but I would love to find a solution to this problem. Thanks
  10. Plamen
    Admin
    Plamen avatar
    3049 posts

    Posted 14 Sep 2011 Link to this post

    Hello Ilya,

    I inspected the issue with the recurring appointments but could not notice any difference in the functionality. Please have a look at the sample project that is attached that hardcoded your AdvancedEditTemlate.

    All the best,
    Plamen Zdravkov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  11. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 29 Sep 2011 Link to this post

    Hi, I want to go back to this issue. Lets say I decide to use the popup box and either select Edit only this occurrence or Edit this series option. Both will open the AdvancedEdit form. But how do I distinguish which option was selected by the user in the code behind? I need to know this to correctly process data after user makes the changes. If it's edit this occurrence then I will create an exception, if it's edit the series I will update the existing appointment record. Thanks
  12. Plamen
    Admin
    Plamen avatar
    3049 posts

    Posted 04 Oct 2011 Link to this post

    Hello Ilya,

    You can use the onClientRecurrenceActionDialogClosed event and if you need the result on the server-side,  pass it with an AjaxRequest.

    Hope this will be helpful.

    All the best,
    Plamen Zdravkov
    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
  13. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 06 Oct 2011 Link to this post

    Plamen,

    Ok, here is the issue I am having. When user selects "Edit this occurrence only" option he is presented with an advanced form and that appointment will be saved as an Exception. How do I know what is the parent Appointment ID in this situation? e.Appointment.ID returns nothing in this case. And without knowing the ID of the parent I cannot create an exception and specify DataRecurrenceParentKeyField.

    Thanks
  14. Plamen
    Admin
    Plamen avatar
    3049 posts

    Posted 11 Oct 2011 Link to this post

    Hi Ilya,

    I am sending you a sample demo project that follows my idea from the last post and uses the client event and after that AjaxRequest  and changes the name of the parent appointment.

    Hope this will be helpful.

    Best wishes,
    Plamen Zdravkov
    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
  15. Ilya
    Ilya avatar
    67 posts
    Member since:
    Jul 2012

    Posted 11 Oct 2011 Link to this post

    Hi Plamen,

    Well actually this line helped me to solve the problem:

    var parent = eventArgs.get_appointment().get_recurrenceParentID();

    I actually wrote a small WebService that assigns value of the parent from above code to a session variable. Then I added a reference to that service in RadScriptManager and now able to call that service from Javascript by using this javascript. In case anybody needs it here is the full VB solution:

    1. Create a new WebService and un-comment this line. I called it Appointment
    ' <System.Web.Script.Services.ScriptService()> _
    2. Since I needed the method to be able to deal with session variables I added the following:
    <WebMethod(EnableSession:=True)> _
    3. My method looks pretty simple:
    <WebMethod(EnableSession:=True)> _
    Public Sub SetSession(ByVal AppId As Integer)
       Session("AppId") = AppId
    End Sub
    4. Now add reference to the service in your ScriptManager:
    <Services>
        <asp:ServiceReference Path="~/Appointment.asmx" />
    </Services>
    5. Now add this to the RadScheduler to make scheduler call your javascript:
    OnClientRecurrenceActionDialogClosed="SetAppId"
    6. And finally the Javascript that uses the Appointment service
    function SetAppId(sender, eventArgs) {
        var parent = eventArgs.get_appointment().get_recurrenceParentID();
        Appointment.SetSession(parent);
    }

    Ilya
Back to Top