aspnet-devexpress-dot-web-dot-aspxgantt-dot-daily-b7d8503f.md
Specifies how many times the daily rule occurs.
Namespace : DevExpress.Web.ASPxGantt
Assembly : DevExpress.Web.ASPxGantt.v25.2.dll
NuGet Package : DevExpress.Web
[DefaultValue(0)]
public int OccurrenceCount { get; set; }
<DefaultValue(0)>
Public Property OccurrenceCount As Integer
| Type | Default | Description |
|---|---|---|
| Int32 | 0 |
Specifies how many times the daily rule occurs.
|
In the following example, set the OccurrenceCount property to 5 to repeat the daily rule 5 days after the specified start date (Daily.Start).
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.OccurrenceCount = "5";
ASPxGantt1.WorkTimeRules.Add(rule1);
In markup:
<dx:DailyRule>
<Recurrence Start="2/22/2019" OccurrenceCount="5" />
<WorkTimeRanges>
<dx:WorkTimeRange Start="08:00" End="10:00" />
<dx:WorkTimeRange Start="15:00" End="18:00" />
</WorkTimeRanges>
</dx:DailyRule>
Web Forms : ASPxGantt - Work Time Schedule)
See Also