|
|
Try double clicking on different elements of a control.
This will open new pages, hyperlinks point to.
Additional information will be passed in a request to
a newly opened page.
To build a request string a JavaScript function can be used. |
A scheduler control has many areas, hyperlinks can be
assigned to.
A way these pages are displayed and area-related events are defined by
Sch.XxxxStyle properties corresponding to these areas.
For example a BodyStyle corresponds to main scheduler grid,
DefaultItemStyle corresponds to SchedulerItem objects displayed on
it, and ResourceListStyle to a list (tree) of resources in a
left part of a control.
In these objects there are EventClick and EventDblClick
properties determining behavior after this area is clicked or double clicked.
In following PostBackUrl and PostBackTarget properties you
can define a page to be opened after a mouse button is clicked.
For example a Sch.ResourceHeaderStyle.EventClick.PostBackUrl
property determines a page to be opened after a header of
resource objects list is clicked.
Sch.DefaultItemStyle.EventDblClick.PostBackUrl property defines a
page opened after an item object on a grid is double clicked.
PostBackTarget property allows to define where a page is to be opened.
"_blank" means a new browser window.
Frequently it is necessary to precisely determine an area of a
scheduler control clicked.
E.x. what exactly SchedulerItem object a new page is to be opened for.
This information should be embedded in a request.
This can be done using ClickedItem, ClickedRow,
ClickedColumn and ClickedDateTime properties locating a
place clicked.
An address of a HTML page assigned to a PostBackUrl property can
contain additional JavaScript code calculating some
elements of this address.
This code should be enclosed in { and }.
Setting a PostBackUrl property to a
"~/Demo/WebScheduler/ShowHref.aspx?item={SchObj.get_ClickedItem().get_ItemID()}"
value means that there will be a parameter item containing an identifier of a
SchedulerItem.ItemID object clicked in an address of a page to be opened.
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.
|