Skip to main content

DxSchedulerMonthView.SnapToCellsMode Property

Specifies how appointments snap to time cells in the Month view.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public SchedulerSnapToCellsMode SnapToCellsMode { get; set; }

Property Value

Type Description
SchedulerSnapToCellsMode

A SchedulerSnapToCellsMode enumeration value.

Available values:

Name Description
Auto

Appointments that occupy less than two time cells stretch to the cell borders. The remaining appointments do not stretch.

Always

Appointments always stretch to cell borders and always occupy the entire cell.

Never

Appointments do not stretch.

Remarks

Use the SnapToCellsMode property to specify how appointments appointments stretch.

In the following image, the SnapToCellsMode property is set to Never:

Appointments do not stretch

In the image below, the SnapToCellsMode property is set to Always:

Appointments always stretch

In the last image, the SnapToCellsMode property is set to Auto:

Auto stretching

The following code snippet applies the SnapToCellsMode property to the Month view:

<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage">
    <DxSchedulerMonthView SnapToCellsMode="SchedulerSnapToCellsMode.Auto" CellMinWidth="100"></DxSchedulerMonthView>
</DxScheduler>

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage()
    {
        AppointmentsSource = GetAppointments(),
        AppointmentMappings = new DxSchedulerAppointmentMappings()
        {
            Type = "AppointmentType",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status",
            RecurrenceInfo = "Recurrence"
        }
    };
    @* ... *@
}
See Also