Skip to main content

TabClickEventArgs.TabIndex Property

Gets the clicked tab’s index.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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.

<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