SchedulerSettings.HtmlTimeCellPrepared Property
In This Article
Enables you to perform custom actions when the HTML code representing the time cell is prepared for display.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.2.dll
NuGet Package: DevExpress.Web.Mvc5
#Declaration
public ASPxSchedulerTimeCellPreparedEventHandler HtmlTimeCellPrepared { get; set; }
#Property Value
Type | Description |
---|---|
ASPx |
A method to which custom processing is delegated. |
#Remarks
The HtmlTimeCellPrepared event occurs before a time cell is rendered. Handling this event enables you to specify the style and color of a particular time cell, and even insert a Literal control to display text.
For more information, refer to the ASPxScheduler.HtmlTimeCellPrepared article.
#Example
The following example illustrates how to use the SchedulerSettings.HtmlTimeCellPrepared
delegate property.
settings.HtmlTimeCellPrepared = (s, e) =>
{
var scheduler = s as MVCxScheduler;
if (scheduler != null && scheduler.Storage.GetAppointments(e.Interval).Count > 0 )
e.Cell.BackColor = System.Drawing.Color.Red;
else
e.Cell.BackColor = System.Drawing.Color.LightBlue;
};
See Also