Skip to main content

CustomizeElementStyleEventArgs.ElementType Property

Gets a type of the scheduler’s visual element.

Namespace: DevExpress.Web.ASPxScheduler

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

Declaration

public WebElementType ElementType { get; }

Property Value

Type Description
WebElementType

A WebElementType enumeration member specifying the visual element type.

Available values:

Show 21 items
Name Description
None

There is no web element to apply the custom style to.

DateHeader

Identifies the date header to which the custom style should be applied.

HorizontalResourceHeader

Identifies the horizontal resource header to which the custom style should be applied.

VerticalResourceHeader

Identifies the vertical resource header to which the custom style should be applied.

DayHeader

Identifies the day header to which the custom style should be applied.

RightTopCorner

Identifies the right top corner to which the custom style should be applied.

BottomLeftCorner

Identifies the bottom left corner to which the custom style should be applied.

LeftTopCorner

Identifies the left top corner to which the custom style should be applied.

GroupSeparatorHorizontal

Identifies the horizontal group separator to which the custom style should be applied.

GroupSeparatorVertical

Identifies the vertical group separator to which the custom style should be applied.

TimeCellBody

Identifies the time cell body to which the custom style should be applied.

AllDayArea

Identifies the all day area to which the custom style should be applied.

TimeRulerMinute

Identifies the time ruler minute to which the custom style should be applied.

TimeRulerHours

Identifies the time ruler hours to which the custom style should be applied.

DateCellHeader

Identifies the date cell header to which the custom style should be applied.

DateCellBody

Identifies the date cell body to which the custom style should be applied.

SelectionBar

Identifies the selection bar to which the custom style should be applied. For internal use only.

TimelineCellBody

Identifies the timeline cell body to which the custom style should be applied.

TimelineDateHeader

Identifies the timeline date header to which the custom style should be applied.

LabelWebControl

Identifies the label web control to which the custom style should be applied.

TimeRulerHeader

Identifies the time ruler header to which the custom style should be applied.

Remarks

Use the ElementType property to obtain the type of the visual element to which the custom style should be applied (CustomizeElementStyleEventArgs.Style). Use the CustomizeElementStyleEventArgs.Cell property to determine the resource and time interval corresponding to the process visual element. To obtain whether an element should have a specific appearance (for example, date headers and date cells corresponding to today’s date), use the CustomizeElementStyleEventArgs.IsAlternate property.

Example

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