Back to Devexpress

DailyRule Class

aspnet-devexpress-dot-web-dot-aspxgantt-58bd5aee.md

latest2.6 KB
Original Source

DailyRule Class

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

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
public class DailyRule :
    RuleBase
vb
Public Class DailyRule
    Inherits RuleBase

Remarks

In markup:

aspx
<dx:ASPxGantt ID="Gantt" runat="server" ... /> 
    ...
    <WorkTimeRules> 
        <dx:DailyRule>
            <Recurrence Start="2/22/2019" End="2/25/2019" />
            <WorkTimeRanges>
                <dx:WorkTimeRange Start="08:00" End="10:00" />
                <dx:WorkTimeRange Start="15:00" End="18:00" />
            </WorkTimeRanges>
        </dx:DailyRule>
        ...
    </WorkTimeRules>
</dx:ASPxGantt>

In code:

csharp
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

Implements

IStateManager

IPropertiesOwner

IExpressionsAccessor

Inheritance

Object StateManager CollectionItem RuleBase DailyRule

See Also

DailyRule Members

ASPxGantt - 'How To' Examples

DevExpress.Web.ASPxGantt Namespace