All docs
V19.2
19.2
19.1
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

MonthlyRule Class

Provides settings that allow you to specify a rule for a month.

Namespace: DevExpress.Web.ASPxGantt

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

Declaration

public class MonthlyRule :
    RuleBase
Public Class MonthlyRule
    Inherits RuleBase

Remarks

Declaratively:

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

DailyRule rule1 = new DailyRule();
rule1.WorkTimeRanges.AddRange( new List<WorkTimeRange>
{
    new WorkTimeRange(){ Start=new TimeSpan(08,00,00), End=new TimeSpan(10,00,00)},
    new WorkTimeRange(){ Start=new TimeSpan(15,00,00), End=new TimeSpan(18,00,00)}
});
rule1.Recurrence.Start = new DateTime(2019, 02, 22);
rule1.Recurrence.End = new DateTime(2019, 02, 25);

ASPxGantt1.WorkTimeRules.Add(rule1);

Concept

Work Time Rules

Online Demos

Inheritance

See Also