Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSchedulerDateTimeRangeCollection.Interval Property

Gets the date range.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public DxSchedulerDateTimeRange Interval { get; }

#Property Value

Type Description
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="" style="display: flex; flex-direction: row; align-items: center;">
                    <div style="padding: 0.4725rem;">
                        Current interval: @context.Intervals.Interval<br/>
                        Duration: @context.Intervals.Duration
                    </div>
                </div>
            </ResourceHeaderCellTemplate>
        </DxSchedulerDayView>
    </Views>
</DxScheduler>

@code {
@* ... *@
    DateTime Start, End;
    DxSchedulerDateTimeRange Interval;

    void OnHtmlCellDecoration(SchedulerHtmlCellDecorationEventArgs args) {
        if  (args.CellType == SchedulerCellType.ResourceHeader) {
            args.CssClass = "card-header";
            args.Style = "padding: 0.4725rem;";

Date-time Interval and Duration

See Also