Back to Devexpress

ASPxGantt.WorkTimeRules Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-aspxgantt-96a62bce.md

latest3.2 KB
Original Source

ASPxGantt.WorkTimeRules Property

Provides access to the work time rules collection.

Namespace : DevExpress.Web.ASPxGantt

Assembly : DevExpress.Web.ASPxGantt.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public WorkTimeRulesCollection WorkTimeRules { get; }
vb
Public ReadOnly Property WorkTimeRules As WorkTimeRulesCollection

Property Value

TypeDescription
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

aspx
<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

ASPxGantt - 'How To' Examples

ASPxGantt Class

ASPxGantt Members

DevExpress.Web.ASPxGantt Namespace