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

TabClickEventArgs.TabIndex Property

Gets the clicked tab’s index.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public int TabIndex { get; }

#Property Value

Type Description
Int32

A zero-based tab index.

#Remarks

Use the TabIndex property to access the clicked tab’s index from the DxTabs.TabClick or DxTabBase.Click event handlers.

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

@ClickedTab

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

    void OnTabClick(TabClickEventArgs e) {
        ClickedTab = $"Tab '{e.TabIndex}' has been clicked";
    }
}

Tab Click

See Also