Back to Devexpress

Daily.Interval Property

aspnet-devexpress-dot-web-dot-aspxgantt-dot-daily-fbd53fd3.md

latest2.3 KB
Original Source

Daily.Interval Property

Specifies the daily recurrence’s interval.

Namespace : DevExpress.Web.ASPxGantt

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

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(1)]
public int Interval { get; set; }
vb
<DefaultValue(1)>
Public Property Interval As Integer

Property Value

TypeDefaultDescription
Int321

An interval value.

|

Remarks

In the following example, set the Interval property to 2 to repeat the daily rule every second day after the specified start date (Daily.Start).

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.Interval = "2";

ASPxGantt1.WorkTimeRules.Add(rule1);

In markup:

aspx
<dx:DailyRule>
    <Recurrence Start="2/22/2019" Interval="2" />
    <WorkTimeRanges>
        <dx:WorkTimeRange Start="08:00" End="10:00" />
        <dx:WorkTimeRange Start="15:00" End="18:00" />
    </WorkTimeRanges>
</dx:DailyRule>

Concept

Online Demos

See Also

ASPxGantt - 'How To' Examples

Daily Class

Daily Members

DevExpress.Web.ASPxGantt Namespace