Back to Devexpress

Monthly.CalculateByDayOfWeek Property

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

latest2.2 KB
Original Source

Monthly.CalculateByDayOfWeek Property

Specifies whether the gantt calculates the rule by the day of the week.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public bool CalculateByDayOfWeek { get; set; }
vb
<DefaultValue(False)>
Public Property CalculateByDayOfWeek As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true, to calculate the rule by a day of the week; otherwise, false.

|

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