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

Customising scheduler to move appointments

1 Answer 81 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 04 Sep 2014, 07:14 PM
Hi

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

Regards












1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 09 Sep 2014, 02:38 PM
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 sales@telerik.com or check your account.

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

Regards,
Desislava
Telerik
 
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.
 
Tags
Scheduler and Reminder
Asked by
andieje
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or