DxSchedulerMonthView.DayOfWeekHeaderCellTemplate Property
Specifies the template for Scheduler header cells that display days of the week.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public RenderFragment<SchedulerDayOfWeekHeaderCellInfo> DayOfWeekHeaderCellTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<SchedulerDayOfWeekHeaderCellInfo> | The header cell template. |
Remarks
This template accepts a SchedulerDayOfWeekHeaderCellInfo object as the context
parameter. You can use the parameter’s DayOfWeek property to get the day of the week. 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 marks days of the week with bold:
<DxScheduler StartDate="@DateTime.Today"
DataStorage="@DataStorage"
GroupType="@SchedulerGroupType.Resource">
<Views>
<DxSchedulerMonthView>
<DayOfWeekHeaderCellTemplate>
<div style="width: 100%;">
<b>@context.DayOfWeek</b>
</div>
</DayOfWeekHeaderCellTemplate>
</DxSchedulerMonthView>
</Views>
</DxScheduler>
@code {
DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
AppointmentsSource = ResourceAppointmentCollection.GetAppointments(),
AppointmentMappings = new DxSchedulerAppointmentMappings() {
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" }
}
}
};
}
See Also