Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Show All Themes

Custom Day Rendering

Click a highlighted date

October 2010

The DevExpress ASP.NET Calendar (ASPxCalendar) editor allows you to change the way in which calendar days are rendered. The following events can be handled to customize the appearance and functionality of a day cell:

  • the DayCellInitialize event occurs before a day cell is created. This event allows you to specify whether or not the processed day is a weekend day; this event also allows you to change the day text, and set the hyper link and target of the cell;
  • the DayCellCreated event occurs after a day cell is created. This event allows you to populate the cell with custom controls;
  • the DayCellPrepared event occurs before a day cell is rendered. This event allows you to customize the cell appearance.

In this demo, a calendar displays information about notes scheduled in October. A list of October notes is stored within an xml file. The DayCellInitialize event is handled to set hyperlinks for calendar days that correspond to one or more associated notes. A click on a hyperlink sends a callback to the server to obtain the corresponding note information. The information obtained is then displayed within a popup window. The DayCellPrepared event is handled to specify special style settings for the days with notes.

Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
Open VB Solution
The source code files for this demo are installed (by default) in the following directories:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\ASPxEditorsDemos
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\VB\ASPxEditorsDemos