Customising scheduler to move appointments

2 posts, 0 answers
  1. andieje
    andieje avatar
    473 posts
    Member since:
    Oct 2006

    Posted 04 Sep 2014 Link to this post


    Lets say i have an appointment on mon 10-11 and another on tuesday 10-11 and tuesday 11-12

    Normally on schedulers if you try to move an appointment say from mon 10-11 to tues 10-11 where the slot is already taken then
    a) the move is disallowed as the target slot is occupied
    b) the appointment from monday is moved and sits side by side with the the tuesday appointment giving concurrent appointments

    I want a different logic than this.

    If you move an appointment from mon 10-11 to tues 10-11 then the existing tues 10-11 slot gets moved to 11-12 and the tues 11-12 gets moved to tues12-1.
    In other words I can move an appointment to an occupied slot and everything else gets shunted down to accomodate it (taking into account weekends etc)

    Is this possible?

    Also how far in advance can you see with the scheduler? Normally I would only want to see a week or 2 but sometimes I might need to scroll down a whole year.

    Thanks in advance for any help you can give me.
    This certainly does affect whether I will buy the products


  2. Dess
    Dess avatar
    1560 posts

    Posted 09 Sep 2014 Link to this post

    Hello Andieje,

    Thank you for writing.

    The described drag and drop functionality is not supported out of the box. However, you can use the SchedulerElement.DragDropBehavior.AppointmentDropped event and manually shift all the appointments. Here is a sample implementation:
    private void DragDropBehavior_AppointmentDropped(object sender, AppointmentMovedEventArgs e)
        foreach (Appointment app in this.radScheduler1.Appointments)
            if (app.StartDateTime.Date == e.Appointment.Start.Date &&
                app.StartDateTime >= e.Appointment.Start &&
                app != e.Appointment)
                app.Start = app.StartDateTime.AddHours(1);

    As to the restricted interval for navigating, you can use the RadScheduler.AccessibleInterval:
    DateTime start = new DateTime(2014, 09, 01);
    DateTime end = new DateTime(2014, 09, 16);
    this.radScheduler1.AccessibleInterval = new DateTimeInterval(start,end);

    Off topic, I noticed that your subscription has expired, which means that your support package has expired as well. Note that you will need to renew your subscription in order to continue to receive support from us. To do this, please contact or check your account.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
  3. DevCraft banner
Back to Top