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

[Solved] Recurrence and Custom Edit Window?

14 Answers 346 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 02 Sep 2008, 09:09 PM
Is there documentation anywhere for implementing Recurrence when using a Custom Advanced Edit window. I've got an implementation that's about identical to the Live Demo example that uses a RadDock control to implement a custom edit window, but that example doesn't show anything about implementing recurrence in the edit window. Is there an example for this somewhere?

14 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Sep 2008, 01:12 PM
Hi Brad,

The recurrence functionality has to be implemented from scratch in this scenario. Perhaps you can reuse the code which implements recurrence from the Customizing the Advanced Template example. The user control which implements recurrence is SchedulerDefaultForm.ascx.


Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 1
answered on 03 Sep 2008, 01:33 PM
Thanks Peter, I'll take a look at that example, and see if it can help me.

I've got recurrence mostly working. The only thing I'm having a hard time with, is when you edit a recurring series, and change the actual recurrence values (i.e. change it from ending after a certain date, to ending after a certain number of occurrences, or changing it from monthly to weekly, or things like that). I'm having a hard time coming up with a decent solution to handle that.

0
Brad
Top achievements
Rank 1
answered on 03 Sep 2008, 02:24 PM
Hi again Peter.

I looked at the example, and it doesn't really help me. It only seems to include code for displaying the appointment in the edit form. It doesn't have any code for making the updates to the appointment when the user clicks the "Update" button.

As I mentioned in my previous post, I've got pretty much everything covered, except for the situation where a user edits a recurring appointment, and changes the recurrence values (frequency and/or range).

My first thought was to create a new recurrence rule based on the user's input, and then assign that to the appointment. But if I do that, I lose any exceptions that exist for the appointment. So it appears that I have to update the existing recurrence rule, correct? With so many possible combinations of settings, that could be quite tedious and difficult. Is there something I'm missing that would make this task easier?
0
Peter
Telerik team
answered on 03 Sep 2008, 02:42 PM
Hello Brad,

I just tested the Customizing the Advanced Template example for any issues related to recurrence, but I didn't find any. Please, see this help topic for more information and also download a sample project for reference from here.

If you continue to experience difficulties, please be more specific what exactly you have implemented and/or open a support ticket with an attached sample project.


Cheers,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Brad
Top achievements
Rank 1
answered on 03 Sep 2008, 03:17 PM
Thanks for your help Peter. Perhaps I'm not explaining my situation correctly.

I'm not using the Advanced Editor. I'm using a custom editor (i.e. I'm using a RadDock to implement my own custom editor, as in the example in the live demo, External Edit in RadDock). My implementation is an exact copy of the External Edit in RadDock example. The advanced editor automatically handles all of the recurrence settings, so you don't have to do anything. But, in a custom editor (like in the External Edit in RadDock example), you have to manage all of the data inputs yourself in the code behind. You have to create the appointment, set its values, and insert/update it via the scheduler. Using the RadDock example, I've got all of this setup and working properly. The part I'm having a hard time with, is the case when a user edits a recurring appointment, and changes the recurrence values (frequency and/or range). I'm not getting errors or anything, I just don't know how to properly and efficiently update the appointment to refelect the changed values. The External Edit in RadDock example doesn't cover recurring appointments, so there is nothing in that example to show how to properly handle editing of recurring appointments.

Again, the AdvanceEditor demo doesn't show this because it handles the recurrence settings automatically and internally. And I'm not using the Advanced Editor, so that example doesn't help me. The developer doesn't have to write any code to handle recurrence. But in a, external custom editor (which I am using), it's up to the developer to handle the recurrence values, and make sure they are set properly on the appointment, and I can't get it to work quite right, and can't find any examples of how this should be done.

Basically, I've implemented an exact copy of the "External Edit in RadDock" example. But that example falls short when it comes to recurring appointments. That example ignores recurring appointments all together. In my implementation, I've added inputs to the custom RadDock editor to let the user add recurrence to their appointments. I've hooked up those inputs so that new recurring appointments can be added. But I'm stuck on the implementation of editing a recurring appointment. If the recurrence values are changed, what is the proper way to update the appointment with the new recurrence values?
0
Brad
Top achievements
Rank 1
answered on 05 Sep 2008, 04:26 PM
hmm ... No more info on this?
0
Peter
Telerik team
answered on 08 Sep 2008, 12:25 PM
Hello Brad,

Thank you for clarifying. Even if you insert or edit an appointment with RadDock, you can still reuse the code which implements recurrence in the advanced form from the example which I referred you to. I am not sure why experience problems, but the best way to help you quickly resolve the case would be if you open a support ticket and send us a working demo project.


Kind regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Matthew
Top achievements
Rank 1
answered on 09 Sep 2008, 10:32 PM
Brad,
I am doing this exact thing. Any luck in finding how to accomplish this? I will keep in touch to let you know if I find anything out myself.
0
Brad
Top achievements
Rank 1
answered on 10 Sep 2008, 01:48 PM
Matthew,

I haven't really gotten anywhere with it. What I figured out, is that when you are editing the appiontment, you can get the recurrence rule string, and then parse it into a recurrencerule object. Then based on what the user has entered in the edit form, you can update the values of the various properties of the recurrencerule object to fit the new recurrence settings, and finally set the appointments reccurrencerule string to the string generated by the updated recurrencerule object. But there are several gotchas that kept me from getting it fully working:

1.) It's not enough to just update the properties on the recurrence rule object. You have to got through all the properites and clear them all out first, and then set the properties you need.

2.) Where I ultimately gave up was in dealing with exceptions, and out of scope appointments. I think I got exceptions working properly with updated recurrence values. But out of scope appointments were just too much to deal with. That is, if the appointment is initially scheduled to last for a month, and then it's edited to last only 2 weeks, then some of the appointments (namely the one's in the last 2 weeks) need to be deleted. It works fine if those are normal appointments. But if one of those individual appointments have been edited (i.e. it's recurrence state is exception), then it is stored separatly in the datastore, you have to manually remove it from your datastore.

In the end it just became too much of a pain in the butt to do, and there are no good examples out there to use, so I scrapped it. I setup my solution as follows:

When someone edits a recurring appointment series, I have a checkbox for "Reset Exceptions". If that box is checked, then any exceptions will be removed (and thus replaced with the standard recurring appointment). I show all of the recurrence inputs with their values, but they are disabled, so you can't change the recurrence. If someone really needs to edit the recurrence settings of an appointment, then they are instructed to delete the series, and create a new appointment.
0
Imran
Top achievements
Rank 1
answered on 28 Sep 2008, 07:24 AM
Hello! I've been searching examples, how can I show only appointent portion, I can pass some dummy dates, IDs etc. through URL for saving for now, I need to show just appointment form with recurrence.
0
Stephen
Top achievements
Rank 2
answered on 29 Sep 2008, 07:00 AM
I've had a look at the example code and it works as a Web project but I have my code in a Web application project (it compiles its code into dll's rather than on the fly). When I add all of the files and try to convert each file to a Web app (right click the file and select Convert to Web application) it won't convert several of the files - says they don't have Content properties. It doesn't seem to like the content property of the ScriptBlock.ascx file.

If I try to build the project it (as a Web application) it does not like the fact that MultipleValuresResourceControl and ResourceControl both define the same properties in the same namespace. The Web project (your unmodified version) also puts the red squiggly lines under the duplicates but when you build and run it, it does work. I'm not sure why that is but it doesn't convert over to a Web application.

Would you have an equivelant example project that can be downloaded that uses a Web Application project rather than a Web project?
thanks,
Stephen
0
Peter
Telerik team
answered on 02 Oct 2008, 07:55 AM
Hello guys,

We are aware of the problem that there will be build errors when you try to build a web application project with the sample files we provide, just like Stephen described it. We are currently working on a new sample for Customizing the Advanced Template. It will be available next week.

Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
rjb227s
Top achievements
Rank 1
answered on 26 May 2009, 10:03 PM
So was the item about the sample code not compiling resolved?

Thanks,

Ryan
0
Peter
Telerik team
answered on 27 May 2009, 12:48 PM
Hi Ryan,

You can download a working sample from here:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/sample-project-of-the-customizing-the-advanced-template-example.aspx

Kind 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.
Tags
Scheduler
Asked by
Brad
Top achievements
Rank 1
Answers by
Peter
Telerik team
Brad
Top achievements
Rank 1
Matthew
Top achievements
Rank 1
Imran
Top achievements
Rank 1
Stephen
Top achievements
Rank 2
rjb227s
Top achievements
Rank 1
Share this question
or