<< Handling mouse and context menu  >> Show source code for this site
An example shows how to handle mouse events and link a context menu with the calendar.

Use the right-click on any calendar element to display the associated context menu. When you select ‘Get information’ item from the menu, the server prepares information about element you have clicked on. Notice, you can use the ContextMenu.OnClientMenuActivate client event for make modification of the context menu just before displaying.

Another possibility is clicking by left mouse button. That invokes the appropriate MouseDown client event. For every calendar element is defined its own MouseDown handler that display current state of calendar (get_SelectedAppointment(), get_SelectedDateTime(), get_SelectedResourceIndex()).
 



Server information:


Client event arguments:
waiting for a click...

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.