This is a migrated thread and some comments may be shown as answers.

Editing Recurring Appointents

14 Answers 118 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ilya
Top achievements
Rank 1
Ilya asked on 31 Aug 2011, 04:45 PM
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

14 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 01 Sep 2011, 08:09 AM
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 >>

0
Ilya
Top achievements
Rank 1
answered on 01 Sep 2011, 02:45 PM
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>
0
Ilya
Top achievements
Rank 1
answered on 01 Sep 2011, 06:21 PM
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
0
Ilya
Top achievements
Rank 1
answered on 06 Sep 2011, 01:55 PM
Bump
0
Veronica
Telerik team
answered on 07 Sep 2011, 07:27 AM
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 >>

0
Ilya
Top achievements
Rank 1
answered on 07 Sep 2011, 04:44 PM
Veronika, can you check ticket # 455364. You will be able to find the sample site there.
0
Veronica
Telerik team
answered on 08 Sep 2011, 07:01 AM
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 >>

0
Ilya
Top achievements
Rank 1
answered on 08 Sep 2011, 02:08 PM
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
0
Plamen
Telerik team
answered on 14 Sep 2011, 08:03 AM
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.
0
Ilya
Top achievements
Rank 1
answered on 29 Sep 2011, 10:13 PM
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
0
Plamen
Telerik team
answered on 04 Oct 2011, 08:55 AM
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
0
Ilya
Top achievements
Rank 1
answered on 06 Oct 2011, 05:59 PM
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
0
Plamen
Telerik team
answered on 11 Oct 2011, 12:19 PM
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
0
Ilya
Top achievements
Rank 1
answered on 11 Oct 2011, 04:16 PM
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
Tags
Scheduler
Asked by
Ilya
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Ilya
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or