Back to Devexpress

Monthly.DayOfWeekOccurrence Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-monthly-c6d77ab4.md

latest2.6 KB
Original Source

Monthly.DayOfWeekOccurrence Property

Specifies a day of the week’s occurrence.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public DayOfWeekMonthlyOccurrence DayOfWeekOccurrence { get; set; }
vb
Public Property DayOfWeekOccurrence As DayOfWeekMonthlyOccurrence

Property Value

TypeDescription
DayOfWeekMonthlyOccurrence

A day of the week’s occurrence.

|

Available values:

NameDescription
First

A rule is applied every first specified day of the week.

| | Second |

A rule is applied every second specified day of the week.

| | Third |

A rule is applied every third specified day of the week.

| | Forth |

A rule is applied every fourth specified day of the week.

| | Last |

A rule is applied every last specified day of the week.

|

Remarks

In markup:

aspx
<dx:ASPxGantt ID="Gantt" runat="server" ...>
  ...
    <WorkTimeRules>
        <dx:MonthlyRule IsWorkDay="false">
            <Recurrence DayOfWeek="Monday" DayOfWeekOccurrence="Second" CalculateByDayOfWeek="true" />
        </dx:MonthlyRule>
    </WorkTimeRules>
</dx:ASPxGantt>

In code:

csharp
MonthlyRule monthlyRule = new MonthlyRule();
monthlyRule.IsWorkDay = false;
monthlyRule.Recurrence.DayOfWeek = DayOfWeek.Monday;
monthlyRule.Recurrence.DayOfWeekOccurrence = DayOfWeekMonthlyOccurrence.Second;
monthlyRule.Recurrence.CalculateByDayOfWeek = true;
Gantt.WorkTimeRules.Add(monthlyRule);

Concept

Work Time Rules

Online Demos

See Also

ASPxGantt - 'How To' Examples

Monthly Class

Monthly Members

DevExpress.Web.ASPxGantt Namespace