SchedulerItem objects on a main grid can be moved
with a mouse. Dragging a left or right edge of a rectangle, you can change duration
of a SchedulerItem. These operations result in changing start and end times
and a ResourceRow objects a given SchedulerItem is assigned to.
A way this function works is determined by a Scheduler.BehaviourOptions
property. This is a property containing bit values (flags) representing deifferent
settings.
Turning a SchedulerBehaviorOptions.AllowChangeLevelItem flag off causes
moving a SchedulerItem object to a different level in a ResourceRow
objects tree impossible. E.i. a parent ResourceRow object a SchedulerItem
is assigned to cannot change. It can only be moved to neighbour resource objects
on the same level of a tree.
Other setting of SchedulerBehaviorOptions.AllowDraggingOutside means that
it is possible to move SchedulerItem objects in such a way that a start
or end time will be outside a period of time currently visible on a control.
Switching a SchedulerBehaviorOptions.AllowOverlapItems flag off disallows
a SchedulerItem object to overlap other object. It means that two SchedulerItem
objects in the same resource cannot overlap.
A control enables linking SchedulerItem objects. An item object can then
point to next item objects. A relation is visualised by an arrow. drag &drop
operations affect linked objects also in a way determined by a Scheduler
object properties. A Scheduler.DragItemMode property determines how linked
objects are to be modified when an object is moved. It is possible to move only
an object being changed (other are not moved) or other objects can be moved simultaneously
(only when a resource is not changed). There is also a setting moving all child
objects and not moving parent objects. There is also a setting disallowing moving
an object before the end of previous objects.
ResizeItemBeginMode property determines a way previous objects are to be
changed when only a start time is changed and a ResizeItemEndMode property
a way subsequent objects are to be changed after an end date is changed. Settings
allow to move linked objects as a whole without changing duration or moving neighboring
objects appropriately. It is also possilbe to disallow changing linked objects.
This page demonstrates all these settings. Changing fields on the right you can
cause a postback to be executed and OnLoad server method
to modify properties of a Scheduler object accordingly. It makes it easy
to check operation of a control with different settings.
If you would look into a
source code
for this demo, click on the link.
For demonstration purposes all appointments displayed on a calendar are stored in
ASP.NET session objects, so original values are restored immediately after a new
session object is created.
A list of appointments and resources is intialized every time a new session is started.
|