Skip to main content

ASPxGantt.WorkTimeRules Property

Provides access to the work time rules collection.

Namespace: DevExpress.Web.ASPxGantt

Assembly: DevExpress.Web.ASPxGantt.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public WorkTimeRulesCollection WorkTimeRules { get; }

Property Value

Type Description
WorkTimeRulesCollection

A collection of work time rules.

Remarks

The ASPxGantt allows you to specify work days, work hours, and holidays.

The Gantt stores its work time rules in the WorkTimeRules collection. The following work time rules are available:

The following table lists common rule settings:

Property

Description

IsWorkDay

Specifies whether a day is a work day.

Recurrence

Provides a rule’s recurrence settings. Each rule type provides an individual set of recurrence settings:

WorkTimeRanges

Provides settings for work time ranges.

Concept

Gantt - Work Time Schedule

Example

<dx:ASPxGantt ID="Gantt" runat="server" KeyFieldName="ID" ParentFieldName="ParentID" ... /> 
    ...
    <WorkTimeRules> 
        <dx:DailyRule>
            <WorkTimeRanges>
                <dx:WorkTimeRange Start="08:00" End="11:55" />
            </WorkTimeRanges>
        </dx:DailyRule>
        <dx:WeeklyRule IsWorkDay="false">
            <Recurrence DayOfWeek="Saturday" />
        </dx:WeeklyRule>
        <dx:YearlyRule IsWorkDay="false">
            <Recurrence Day="27" Month="May" />
        </dx:YearlyRule>
    </WorkTimeRules>
</dx:ASPxGantt>

Online Demo

ASPxGantt - Work Time Schedule

See Also