SchedulerSettings.HtmlTimeCellPrepared Property

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.v19.2.dll

Declaration

public ASPxSchedulerTimeCellPreparedEventHandler HtmlTimeCellPrepared { get; set; }
Public Property HtmlTimeCellPrepared As ASPxSchedulerTimeCellPreparedEventHandler

Property Value

Type Description
ASPxSchedulerTimeCellPreparedEventHandler

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.

Examples

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