<< Grid size parameters  >> Show source code for this site

Choose one of the available resolutions: Scheduler.TimeResolution:
Number of columns for a unit of time: Scheduler.NumerOfCols:
Cell size setting properties: Scheduler.CellWidth: , Scheduler.RowHeight:
Hiding vertical or horizontal scrollbars: ,

Both time period and resolution of time presented in the scheduler depends on values of two properties: Scheduler.TimeResolution and Scheduler.NumberOfCols. Multiplying a unit of time and a number of columns determines an interval time displayed. Additionally, using a Scheduler.FirstDateTime property an origin and a Scheduler.LastDateTime property the end of time axis can be set. Changing a Scheduler.LastDateTime property you force recalculation of a Scheduler.NumberOfCols property. Buttons going to either next or previous period of time change origin of a time axis in a scheduler. Time period is not changed. However, a number of columns could change. A situation when a scheduler shows a whole month (or months) causes changing the number of columns. Then changing to next or previous period of time is performed in such a way that the same number of full months are displayed.
Size of a time unit cell and row height can be set. A Scheduler.CellWidth property determines width of a time unit cell. A Scheduler.RowHeight property determines height of all rows in a control.
The size of whole scheduler control depends on assigned to the scheduler control both properties: Scheduler.Width and Scheduler.Height. If the content is bigger than specified size, the scrollbars allow user to scroll currently hidden part of the grid. However, you can hide horizontal or vertical or both scrollbars. If the vertical scrollbar was hidden, the height of the scheduler depends on number of visible rows. Similarly, if the horizontal scrollbar was hidden, the width of the scheduler depends on number of the grid columns and width of the particulars cells.

Notice, many scheduler properties, especially appearance and behavior properties, are not serialized between particularly requests. Therefore, if you initialize these properties from the page code, keep in mind you need do it every request, regardless of the Page.IsPostback property.
However, if you use standard properties setting with helping design mode and properties window, don’t worry, the automatically generated by the ASP.NET interpreter code does it for you. So, you just choose proper property value in the property grid, that’s all.

Notice, if you need to set or reset any behaviour or appearance flag you should use the & and | bitwise operators, like here:
[C#]
for setting: Sch.ViewOptions |= SchedulerViewOptions.HideHorizontalScrollbar;
for resetting: Sch.ViewOptions &= ~SchedulerViewOptions.HideHorizontalScrollbar;
[VB]
for setting: Sch.ViewOptions = Sch.ViewOptions Or SchedulerViewOptions.HideHorizontalScrollbar
for resetting: Sch.ViewOptions = Sch.ViewOptions And Not SchedulerViewOptions.HideHorizontalScrollbar

Operation of this sample page is very simple. After setting the fields below a scheduler are set, a request to a server (postback) is generated and Scheduler object properties initialized with values entered in fields using a OnLoad() server method.

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.