Following the Database example I have built my own version of exceptions.
I have managed to actually create, save to a database and recover to show an exception for a certain appointment. Now my problem is that the original occurrence still shows up.
(Attached is the image: on tuesday you can see the exception, but above it is the parent occurrence. (the appointment is one with a recurrence rule of every weekday).
Obviously, I am missing something but I don't get what...
Thanks in advance.
13 Answers, 1 is accepted
Though I am not completely aware of the approach you are using so that the reported behavior is reproduced, you can remove the needed occurrence by utilizing the Remove method of the control. The topic is discussed in greater detail in the Delete Appointment article. Can you please take a look at it?
Another approach would be to use the DeleteAppointment command. The list of available commands of the control is available here:Commands.
Would such an approach be working for you or I am missing something?
Thank you for you answer.
I was in the belief that some automatic mechanism implemented in the control would take account of which appointments should be shown in the UI and which ones won't (i.e.: show exceptions if they exist, and remove the master appointment at the same time given the existence of those exceptions), but once I realized I needed to implement the inclusion of the exceptions, that made me suspect I should also implement the removal of the originals.
I guess you indirectly answered my question... :-)
Have happy new year!
The implication is: I can't just Delete the appointment: Is a recurrent appointment for Mon, Tue, Wed, Thu and Fri, with an exception on tuesday.
I only have to remove it from the current list, so it is not shown. That is the logic I thought might be part of the control's logic. But it makes sense it is not...?
Thanks for the update.
The Remove method of RadScheduleView provides an overload for removing an Occurrence only. On the other hand, you can fetch a given Occurrence through the AppointmentExtensions.GetOccurence method, as demonstrated in this forum thread. Does this correspond to your requirements?
Hi. After a while I am back to this...
I managed to manage my appointments, exceptions and occurrences.
But i still have some issues and can't figure it out...
The exceptions are correctly saved to my database, and retrieved correctly.
But when I add them to the scheduler, my weekview repeats the occurrences as many times as they are visible ( see screenshot).
If I switch to day view, all appears correctly, BUT the exception doesn't show the small icon for an exception on the top left.
Maybe this rings a bell? What am I doing wrong?
Thank you for the attached images.
From the provided information, however, I cannot confirm the exact cause for this behavior. Can you please share some additional details regarding the setup you are using so that this appearance is reproduced? Also, would it be possible for you to open a new support ticket and provide a sample application demonstrating this as an attachment?
Thank you in advance for your cooperation.
I stripped down the behavior to an example and was able to reproduce my issue.
In my entities, instead of a separate file for exception appointments, I have them in the same table with a parentID pointing to the master.
I am creating the exception occurrence objects on the fly, not persisted.
Obviously something is wrong, but I can't figure out what.
Please see attached project (I changed the extension from .zip to .png)
Thanks for the attachment.
I reviewed and tested it but cannot reproduce any difference between the behavior of the DayViewDefinition and the WeekViewDefinition. Attachment to my reply you can find a short video as a demonstration. Is there any additional step that I need to take in order to reproduce the behavior demonstrated in the image in your last but one reply?
Again, thank you for your cooperation.
I am sorry I was unclear. My bad.
The previous day and week issue was due just to me trying to manually add appointments, exceptions and occurrences.
That is not the issue.
The original issue is the one you can see in the example project: if I load saved recurrent appointment and a corresponding exception, I can not prevent from showing up the original occurrence (i.e.: the one that is now an exception).
If you look at the schedule when it starts, you will see that there is one day when both the original occurrence and the exception are showed. Why the appointment or the recurrence keep showing the occurrence if there is an exception?
What is missing in my implementation?
Thank you for the detailed update.
When adding an exception its ExceptionDate needs to have the relevant Hour set as well. You can take a look a the modified sample application and the AddExceptions method in particular as a demonstration.
I hope this helps. Let me know in case I can be of further assistance.
As I explained in the new thread, I misunderstood the meaning of the property. I was setting it to the date and time of the exception, not to the corresponding master appointment.
Thanks for this clarification.
I am pleased to hear that you have managed to find the correct approach on your own.
Feel free to contact us again in case any other assistance with our components is needed.