Skip to main content

DxScheduler.ActiveViewTypeChanged Event

Fires after the active view is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback<SchedulerViewType> ActiveViewTypeChanged { get; set; }

Parameters

Type Description
SchedulerViewType

The active view’s type.

Remarks

The ActiveViewTypeChanged event occurs each time a user selects another view in the Scheduler.

Note

Use the ActiveViewType property to set the active view’s type in code.

The following code uses the ActiveViewTypeChanged event’s argument to access the active view:

<p style="font-size: 18px">Selected view: "@SelectedView"</p>

<DxScheduler DataStorage="@DataStorage" ActiveViewTypeChanged="(e) => ActiveViewTypeChanged(e)">
    <DxSchedulerDayView ShowWorkTimeOnly="true" />
    <DxSchedulerWeekView ShowWorkTimeOnly="true" />
    <DxSchedulerWorkWeekView ShowWorkTimeOnly="true" />
</DxScheduler>


@code {
    string SelectedView;

    // Create a DxSchedulerDataStorage object

    void ActiveViewTypeChanged(SchedulerViewType e)
    {
        SelectedView = e.ToString();
    }
}

Selected View Changed

View Example: How to Load Appointments for Visible Data Range Only

See Also