Skip to main content
All docs
V26.1
  • DxSchedulerTimelineView.ResourceHeaderCellTemplate Property

    Specifies the template for resource header cells in the Scheduler.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v26.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [Parameter]
    public RenderFragment<SchedulerResourceHeaderCellInfo> ResourceHeaderCellTemplate { get; set; }

    Property Value

    Type Description
    RenderFragment<SchedulerResourceHeaderCellInfo>

    The resource header cell template.

    Remarks

    This template accepts a SchedulerResourceHeaderCellInfo object as the context parameter. You can use the parameter’s Intervals property to get intervals to which the cell belongs. The parameter’s Resource property specifies the resource associated with the cell or contains an empty resource item if no resource is assigned.

    The following example makes resource headers bold:

    <DxScheduler StartDate="@DateTime.Today"
                 DataStorage="@DataStorage"
                 GroupType="@SchedulerGroupType.Resource">
        <Views>
            <DxSchedulerTimelineView Duration="TimeSpan.FromDays(2)">
                <Scales>
                    <DxSchedulerTimeScale Unit="SchedulerTimeScaleUnit.Day"></DxSchedulerTimeScale>
                </Scales>
                <ResourceHeaderCellTemplate>
                    <div class="" class="resource-cell">
                        <b>@context.Resource.Caption</b>
                    </div>
                </ResourceHeaderCellTemplate>
            </DxSchedulerTimelineView>
        </Views>
    </DxScheduler>
    
    @code {
        DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
            AppointmentsSource = ResourceAppointmentCollection.GetAppointments(),
            AppointmentMappings = new DxSchedulerAppointmentMappings() {
                Id = "Id",
                Type = "AppointmentType",
                Start = "StartDate",
                End = "EndDate",
                Subject = "Caption",
                AllDay = "AllDay",
                Location = "Location",
                Description = "Description",
                LabelId = "Label",
                StatusId = "Status",
                RecurrenceInfo = "Recurrence",
                ResourceId = "ResourceId"
            },
            ResourcesSource = ResourceCollection.GetResourcesForGrouping(),
            ResourceMappings = new DxSchedulerResourceMappings() {
                Id = "Id",
                Caption = "Name",
                BackgroundCssClass = "BackgroundCss",
                TextCssClass = "TextCss",
                CustomFieldMappings = new List<DxSchedulerCustomFieldMapping> {
                    new DxSchedulerCustomFieldMapping{ Name = "ImageFileName", Mapping = "ImageFileName" }
                }
            }
        };
    }
    

    Scheduler - Resource Header Template

    Run Demo: Scheduler - Resource Header Template

    See Also