A newer version of this page is available. Switch to the current version.

CustomizeElementStyleEventArgs Class

Provides data for the ASPxScheduler.CustomizeElementStyle event.

Namespace: DevExpress.Web.ASPxScheduler

Assembly: DevExpress.Web.ASPxScheduler.v18.2.dll


public class CustomizeElementStyleEventArgs :
Public Class CustomizeElementStyleEventArgs
    Inherits EventArgs


Use the ASPxScheduler.CustomizeElementStyle event to customize the visual representation of scheduler control elements, such as day headers, horizontal and vertical resource headers, all-day area, time cells, etc. The CustomizeElementStyleEventArgs provides the CustomizeElementStyleEventArgs.Style property that allows you to set different style attributes for the visual element, the CustomizeElementStyleEventArgs.ElementType property specifying the element type, the CustomizeElementStyleEventArgs.Cell property obtaining information on a resource and time interval corresponding to the visual element, and the CustomizeElementStyleEventArgs.IsAlternate property determining whether the visual element is highlighted within the scheduler control.


This example demonstrates how to fill all resource headers with specific colors obtained from the ASPxScheduler.ResourceColorSchemas collection by handling the ASPxScheduler.CustomizeElementStyle event.

using DevExpress.Web.ASPxScheduler;
// ...

protected void ASPxScheduler1_CustomizeElementStyle(object sender, CustomizeElementStyleEventArgs e) {
    if (e.ElementType == WebElementType.VerticalResourceHeader) {
        int id = ASPxScheduler1.Storage.Resources.Items.IndexOf(e.Cell.Resource);
        e.Style.BackColor = ASPxScheduler1.ResourceColorSchemas[id % ASPxScheduler1.ResourceColorSchemas.Count].Cell;


See Also