Avoiding the overlap of 2 appointments

5 posts, 0 answers
  1. Abod
    Abod avatar
    2 posts
    Member since:
    May 2013

    Posted 12 Jun 2013 Link to this post

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

    Thanks in advance
  2. DevCraft R3 2016 release webinar banner
  3. Peter
    Peter avatar
    1148 posts

    Posted 17 Jun 2013 Link to this post

    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.

    RadChart for WinForms is obsolete. Now what?
  4. TravisTr
    TravisTr avatar
    10 posts
    Member since:
    Jul 2013

    Posted 22 Jan Link to this post

    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.

  5. Dess
    Dess avatar
    1561 posts

    Posted 25 Jan Link to this post

    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.
    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
Back to Top
DevCraft R3 2016 release webinar banner