Back to Devexpress

Weekly.DayOfWeek Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-weekly.md

latest2.1 KB
Original Source

Weekly.DayOfWeek Property

Specifies a day of the week to which the rule is applied.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public DayOfWeek DayOfWeek { get; set; }
vb
Public Property DayOfWeek As DayOfWeek

Property Value

TypeDescription
DayOfWeek

A day of the week.

|

Remarks

The following example illustrates how to make Saturday and Sunday non-working days.

In markup:

aspx
<dx:ASPxGantt ID="Gantt" runat="server" ... /> 
    ...
    <WorkTimeRules> 
        <dx:WeeklyRule IsWorkDay="false" >
            <Recurrence DayOfWeek="Saturday" />
        </dx:WeeklyRule>
        <dx:WeeklyRule IsWorkDay="false">
            <Recurrence DayOfWeek="Sunday" />
        </dx:WeeklyRule>
        ...
    </WorkTimeRules>
</dx:ASPxGantt>

In code:

csharp
WeeklyRule weekRule1 = new WeeklyRule();
weekRule1.Recurrence.DayOfWeek = DayOfWeek.Saturday;
weekRule1.IsWorkDay = false;

WeeklyRule weekRule2 = new WeeklyRule();
weekRule2.Recurrence.DayOfWeek = DayOfWeek.Sunday;
weekRule2.IsWorkDay = false;

Gantt.WorkTimeRules.Add(weekRule1);
Gantt.WorkTimeRules.Add(weekRule2);

Online Demos

See Also

ASPxGantt - 'How To' Examples

Weekly Class

Weekly Members

DevExpress.Web.ASPxGantt Namespace