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

DxTabBase.Click Event

Fires when a user clicks the tab.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<TabClickEventArgs> Click { get; set; }

#Event Data

The Click 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.
TabInfo Returns information about a tab related to the event.

#Remarks

Use the Click event to specify individual click handlers for tabs. You can also use the DxTabs.TabClick event to specify a common click handler for all tabs.

Razor
<DxTabs>
    <DxTab Text="Home" Click="OnTabClick"></DxTab>
    <DxTab Text="Products"></DxTab>
    <DxTab Text="Support"></DxTab>
</DxTabs>

@Alert

@code  {
    public string Alert { get; set; } = "";

    void OnTabClick(TabClickEventArgs e) {
        Alert = $"`Home` tab has been clicked";
    }
}

Tab Click

See Also