Skip to main content

DxFormLayoutTabPages.TabClick Event

Fires when a user clicks the Form Layout’s tab.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor


public EventCallback<TabClickEventArgs> TabClick { get; set; }

Event Data

The TabClick event's data class is TabClickEventArgs. The following properties provide information specific to this event:

Property Description
MouseEventArgs The Blazor’s built-in MouseEventArgs event arguments.
TabIndex Gets the clicked tab’s index.


Use the TabClick event to specify a click handler for all Form Layout’s tabs. You can also use the DxFormLayoutTabPage.Click event to specify individual click handlers for tabs.

<DxFormLayout CssClass="w-100">
    <DxFormLayoutTabPages @bind-ActiveTabIndex="@ActiveTabIndex"
        <DxFormLayoutTabPage Caption="Personal Information">
            <DxFormLayoutItem Caption="First Name:" ColSpanMd="6">
                <DxTextBox @bind-Text="@FirstName" />
            <DxFormLayoutItem Caption="Last Name:" ColSpanMd="6">
                <DxTextBox @bind-Text="@LastName" />
            <DxFormLayoutItem Caption="Birth Date:" ColSpanMd="6">
                <DxDateEdit @bind-Date="@BirthDate" />
        <DxFormLayoutTabPage Caption="Work Information">
            <DxFormLayoutItem Caption="Position:" ColSpanMd="6">
                <DxTextBox @bind-Text="@Position" />
            <DxFormLayoutItem Caption="Hire Date:" ColSpanMd="6">
                <DxDateEdit @bind-Date="@HireDate" />
            <DxFormLayoutItem Caption="Notes:" ColSpanMd="6">
                <DxTextBox @bind-Text="@Notes" />


@code {
    int ActiveTabIndex { get; set; } = 1;
    string FirstName { get; set; } = "Nancy";
    string LastName { get; set; } = "Davolio";
    DateTime BirthDate { get; set; } = DateTime.Now.AddYears(-20);
    string Position { get; set; } = "Sales Representative";
    DateTime HireDate { get; set; } = DateTime.Now.AddYears(-20);
    string Notes { get; set; } = "Education includes a BA in psychology.";
    string ClickedTab { get; set; } = "";

    void OnTabClick(TabClickEventArgs e) {
        ClickedTab = $"The '{e.TabIndex}' tab was clicked";

Tab Click

See Also