Skip to main content
All docs
V24.2

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

TabReorderEventArgs.ToIndex Property

Returns the index (according to the component markup) of the end tab position.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public int ToIndex { get; }

#Property Value

Type Description
Int32

The tab index according to the component markup.

#Remarks

Use FromIndex and ToIndex properties to get information about start and end tab positions among other tabs.

The following example restricts the last tab from being moved from its position.

razor
<DxTabs AllowTabReorder="true" TabReordering="@TabReordering">
    <DxTab Text="The 1st Tab" />
    <DxTab Text="The 2nd Tab" />
    <DxTab Text="The 3rd Tab" />
    <DxTab Text="The 4th Tab" />
    <DxTab Text="The Last Tab" />
</DxTabs>

@code {
    void TabReordering(TabReorderEventArgs e) {
        if ((e.FromIndex == 4) || (e.ToIndex == 4)) {
            e.Cancel = true;
        }
    }
}
See Also