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

Shift all meetings/tasks when inserting a new one

1 Answer 46 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Camelia
Top achievements
Rank 1
Camelia asked on 04 Aug 2008, 03:21 PM
I need to create a "planning" module in order to manage tasks.
I would like to know if it is possible to configure your scheduler to shift all the tasks already registered, when we insert a new task.
(for example I have a 2hours break, and I want to insert a new task which takes 4 hours... and shift all the others who follow).

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 05 Aug 2008, 08:25 AM
Hi Camelia,

You can use the RadScheduler API to find the appointments in the given range and to update them according to your business rules. For example:

DateTime rangeStart = DateTime.Parse("2008/08/05 12:00"); 
DateTime rangeEnd = rangeStart.AddHours(5); 
 
foreach (Appointment apt in RadScheduler1.Appointments.GetAppointmentsStartingInRange(rangeStart, rangeEnd)) 
    // This is required when working with recurring appointments. 
    // The boolean parameter specifies if the edit operation 
    // should alter the whole series (true) or only this occurrence (false). 
    Appointment aptToEdit = RadScheduler1.PrepareToEdit(apt, false); 
 
    aptToEdit.Start = apt.Start.AddHours(4); 
    aptToEdit.End = apt.End.AddHours(4); 
    RadScheduler1.UpdateAppointment(aptToEdit); 
 


See also:
Let us know if you have any troubles.

All the best,
Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Camelia
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or