Skip to main content
All docs
V25.1
  • DxTreeList.GetStartRowVisibleIndex() Method

    Gets the visible index of the first row on the current page.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    public int GetStartRowVisibleIndex()

    Returns

    Type Description
    Int32

    The row’s visible index.

    Remarks

    The following code snippet displays the visible index of the first row on the current TreeList page:

    @inject EmployeeTaskService EmployeeTaskService
    
    <DxTreeList @ref="MyTreeList"
                Data="TreeListData"
                KeyFieldName="Id"
                ParentKeyFieldName="ParentId"
                PageIndexChanged="TreeList_PageIndexChanged">
        <Columns>
            <DxTreeListDataColumn FieldName="Name" Caption="Task" />
            <DxTreeListDataColumn FieldName="EmployeeName" />
            <DxTreeListDataColumn FieldName="StartDate" />
            <DxTreeListDataColumn FieldName="DueDate" />
        </Columns>
    </DxTreeList>
    
    <p></p>
    Start Row's Visible Index: @StartRowIndex
    <p></p>
    
    @code {
        List<EmployeeTask> TreeListData { get; set; }
        ITreeList MyTreeList { get; set; }
        int StartRowIndex = 0;
    
        protected override void OnInitialized() {
            TreeListData = EmployeeTaskService.GenerateData();
        }
        void TreeList_PageIndexChanged() {
            StartRowIndex = MyTreeList.GetStartRowVisibleIndex();
        }
    }
    

    DevExpress Blazor TreeList - Paging

    See Also