Skip to main content
All docs
V24.2

TabReorderEventArgs.FromIndex Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public int FromIndex { 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.

<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