DxSchedulerDateTimeRangeCollection.Duration Property
Gets the range duration.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public TimeSpan Duration { get; }
Property Value
| Type | Description |
|---|---|
| TimeSpan | The range duration. |
Remarks
The Duration value is calculated as the difference between the End and Start values.
In the following code snippet, the Duration property value is accessible in the <ResourceHeaderCellTemplate> and displayed in resource header cells (SchedulerResourceHeaderCellInfo):
<DxScheduler StartDate="@DateTime.Today"
DataStorage="@DataStorage"
GroupType="@SchedulerGroupType.Resource"
ResourceColorInHeaderVisible="false" HtmlCellDecoration="OnHtmlCellDecoration"
CssClass="w-100" >
<Views>
<DxSchedulerDayView DayCount="2" ShowWorkTimeOnly="true">
<ResourceHeaderCellTemplate>
<div class="" class="cell">
<div class="p-2">
Current interval: @context.Intervals.Interval<br/>
Duration: @context.Intervals.Duration
</div>
</div>
</ResourceHeaderCellTemplate>
</DxSchedulerDayView>
</Views>
</DxScheduler>

See Also