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

Appointment with exceptions still showing up

13 Answers 169 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Iron
Richard asked on 20 Dec 2017, 09:21 PM

Hi.

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

Sort by
0
Stefan
Telerik team
answered on 25 Dec 2017, 01:51 PM
Hi Richard,

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?

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Richard
Top achievements
Rank 1
Iron
answered on 30 Dec 2017, 01:17 PM

Hi Stefan.

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!

0
Richard
Top achievements
Rank 1
Iron
answered on 30 Dec 2017, 01:24 PM

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...?

0
Stefan
Telerik team
answered on 03 Jan 2018, 01:13 PM
Hi Richard,

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?
Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Richard
Top achievements
Rank 1
Iron
answered on 17 Jul 2018, 06:32 PM

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? 

0
Accepted
Stefan
Telerik team
answered on 19 Jul 2018, 11:59 AM
Hi Richard,

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.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Richard
Top achievements
Rank 1
Iron
answered on 23 Jul 2018, 08:03 PM

Hello.

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)

 

0
Accepted
Stefan
Telerik team
answered on 26 Jul 2018, 01:30 PM
Hello Richard,

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.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Richard
Top achievements
Rank 1
Iron
answered on 26 Jul 2018, 02:56 PM

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?

0
Richard
Top achievements
Rank 1
Iron
answered on 26 Jul 2018, 03:18 PM
Just to make sure...  Here is a picture of what I am talking about...
0
Accepted
Stefan
Telerik team
answered on 31 Jul 2018, 11:39 AM
Hi Richard,

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.

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Richard
Top achievements
Rank 1
Iron
answered on 06 Aug 2018, 05:40 PM

Hi Stefan.

You're right.

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.

0
Stefan
Telerik team
answered on 07 Aug 2018, 03:59 PM
Hello Richard,

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.

Regards,
Stefan
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ScheduleView
Asked by
Richard
Top achievements
Rank 1
Iron
Answers by
Stefan
Telerik team
Richard
Top achievements
Rank 1
Iron
Share this question
or