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

DxScheduler.ActiveViewTypeChanged Event

Fires after the active view is changed.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[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:

Razor
<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