Skip to main content

GridFocusedRowChangedEventArgs.VisibleIndex Property

Returns the visible index of the focused row.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public int VisibleIndex { get; }

Property Value

Type Description
Int32

The row’s visible index or -1 if the Grid has no data to display.

Remarks

Refer to the GridCustomizeGroupValueDisplayTextEventArgs class description for more information.

<DxGrid @ref="Grid" Data="GridData" PageSize="5"
        FocusedRowEnabled="true"
        FocusedRowChanged="e => rowNumber = e.VisibleIndex + 1">
    <Columns>
        <DxGridDataColumn FieldName="FirstName" />
        <DxGridDataColumn FieldName="LastName" />
        <DxGridDataColumn FieldName="Title" />
        <DxGridDataColumn FieldName="HireDate" />
    </Columns>
</DxGrid>
<text>The focused row number is @rowNumber</text>
@code {
    IGrid Grid { get; set; }
    int rowNumber { get; set; }

    object GridData { get; set; }
    protected override async Task OnInitializedAsync() {
        GridData = await NwindDataService.GetEmployeesAsync();
    }
}
See Also