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

Avoiding the overlap of 2 appointments

4 Answers 208 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Abod
Top achievements
Rank 1
Abod asked on 12 Jun 2013, 06:14 PM

How to enable only one appointment per time slot in windows form scheduler NOT WEB OR WPF?

Thanks in advance

4 Answers, 1 is accepted

Sort by
0
Noé
Top achievements
Rank 1
answered on 13 Jun 2013, 11:07 AM
0
Peter
Telerik team
answered on 17 Jun 2013, 01:19 PM
Hi Abod, 

Thank you for writing.

To prevent adding appointments the same time that there is already another appointment you can cancel the scheduler's 
AppointmentEditDialogShowing event. Also you can access all appointments and their dates from the scheduler's Appointments collection. You can control where the appointments are moved through the appointment related events like AppointmentMoving and AppointmentDropping.

For more information please refer to the scheduler
documentation page.

I hope this helps.

Regards,
Peter
Telerik
RadChart for WinForms is obsolete. Now what?
0
TravisTr
Top achievements
Rank 1
answered on 22 Jan 2016, 06:28 PM

The team I've happened to work today already upgraded their stuff to UI for WinForms Q2 2015 and I'm looking for ways to disallow overlapping appointments.

What would you suggest specifically in regarding to AppointmentMoving and AppointmentDropping you mention above, Peter? Canceling these events as well or something else we can do?

Is there any updates to this in terms of coding strategy that enables Winform RadSchedule to accept non overlapping appointments only? Looks like there is only work-around for ASP.NET RadScheduler in this aspect? Thx.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 25 Jan 2016, 02:03 PM
Hello Travis,

Thank you for writing.

There is no built-in mechanism for preventing overlapping appointments in RadScheduler. The suggested approach by my colleague, Peter, is applicable for preventing overlapping appointments in the newer versions as well. The AppointmentMoving and AppointmentDropping events are suitable for handling overlapping appointments. In the AppointmentMovingEventArgs, you have information about the NewDate. Thus, you can iterate all appointments in RadScheduler and check if the event dates are in conflict with the one being moved. A similar approach can be followed in the AppointmentDropping event.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Scheduler and Reminder
Asked by
Abod
Top achievements
Rank 1
Answers by
Noé
Top achievements
Rank 1
Peter
Telerik team
TravisTr
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or