Back to Devexpress

DayOfWeekMonthlyOccurrence Enum

aspnet-devexpress-dot-web-dot-aspxgantt-424b0fe6.md

latest3.0 KB
Original Source

DayOfWeekMonthlyOccurrence Enum

Lists values that specify the occurrence of a day of week.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public enum DayOfWeekMonthlyOccurrence
vb
Public Enum DayOfWeekMonthlyOccurrence

Members

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.

|

The following properties accept/return DayOfWeekMonthlyOccurrence values:

Remarks

Values of this enumeration are accepted by the DayOfWeekOccurrence property.

The DayOfWeekMonthlyOccurrence class allows you to specify a day of week’s occurrence in a month or in a year. For example, the second Friday in a month.

Web Forms (in markup):

aspx
<dx:ASPxGantt ID="Gantt" runat="server"...>
    ...
    <WorkTimeRules>
        <dx:MonthlyRule>
            <Recurrence DayOfWeek="Thursday" DayOfWeekOccurrence="Second" CalculateByDayOfWeek="true" />
            <WorkTimeRanges>
                <dx:WorkTimeRange Start="08:00" End="16:00" />
            </WorkTimeRanges>
        </dx:MonthlyRule>
    </WorkTimeRules>
</dx:ASPxGantt>

Web Forms (in code):

csharp
...
MonthlyRule monthlyRule1 = new MonthlyRule();
monthlyRule1.WorkTimeRanges.AddRange(new List<WorkTimeRange>
{
    new WorkTimeRange(){ Start=new TimeSpan(08,00,00), End=new TimeSpan(16,00,00)}
});
monthlyRule1.Recurrence.DayOfWeek = DayOfWeek.Thursday;
monthlyRule1.Recurrence.DayOfWeekOccurrence = DayOfWeekMonthlyOccurrence.Second;
monthlyRule1.Recurrence.CalculateByDayOfWeek = true;
...
Gantt.WorkTimeRules.Add(monthlyRule1);

Concept

Work Time Rules

Online Demos

See Also

ASPxGantt - 'How To' Examples

DevExpress.Web.ASPxGantt Namespace