The
OverlappedBesideSelf flag controls placing scheduler item rectangles
side by side. The flag is contained by the
Scheduler.ViewOptions property.
The default
true value means the item rectangles will be placed side by
side. Otherwise, if you reset one all rectangles will take the same place and cover
themselves.
The
SchedulerItem.Layer property helps to control placing overlapped items
on the scheduler grid. If two or more items will be situated on the same layer (they
have the same layer number value), rectangles will be placed side by side. Otherwise,
if you assign items to different layers, the scheduler items will cover themselves.
Notice, the scheduler displays item rectangles in the ResourceRow.Items
collection order. Therefore, if you want to present the small item rectangle above
another, bigger one, you have to add first the bigger item, next the smaller one.
That means the index of the smaller item in the ResourceRow.Items collection has
to be greater than the index of the bigger one. Otherwise, the smaller scheduler
item will be placed below the bigger one (will be covered), and it will be invisible.
Second note: If you need to set or reset the OverlappedBesideSelf flag
you should use the & and | bitwise operators, like:
[C#]
for setting: Sch.ViewOptions |= SchedulerViewOptions.OverlappedBesideSelf;
for resetting: Sch.ViewOptions &= ~SchedulerViewOptions.OverlappedBesideSelf;
[VB]
for setting: Sch.ViewOptions = Sch.ViewOptions Or SchedulerViewOptions.OverlappedBesideSelf
for resetting: Sch.ViewOptions = Sch.ViewOptions And Not SchedulerViewOptions.OverlappedBesideSelf
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.