Back to Devexpress

DxSchedulerDateTimeRangeCollection.Interval Property

blazor-devexpress-dot-blazor-dot-dxschedulerdatetimerangecollection.md

latest2.3 KB
Original Source

DxSchedulerDateTimeRangeCollection.Interval Property

Gets the date range.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
public DxSchedulerDateTimeRange Interval { get; }

Property Value

TypeDescription
DxSchedulerDateTimeRange

The date range.

|

Remarks

The Interval property returns the collection of Start and End dates for ranges to which the cell belongs.

In the following code snippet, the Interval property value is accessible in the <ResourceHeaderCellTemplate> and displayed in resource header cells (SchedulerResourceHeaderCellInfo):

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

                        Duration: @context.Intervals.Duration
                    </div>
                </div>
            </ResourceHeaderCellTemplate>
        </DxSchedulerDayView>
    </Views>
</DxScheduler>
css
.cell {
    display: flex; 
    flex-direction: row; 
    align-items: center;
}

See Also

DxSchedulerDateTimeRangeCollection Class

DxSchedulerDateTimeRangeCollection Members

DevExpress.Blazor Namespace