Skip to main content

DxGrid.ShowAllRows Property

Specifies whether the Grid displays all rows on one page.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(false)]
[Parameter]
public bool ShowAllRows { get; set; }

Property Value

Type Default Description
Boolean false

true to display all rows on one page; otherwise, false.

Remarks

Enable this property to ignore the PageSize value and display all data rows on one page. If the total height of all rows exceeds the Grid height, the Grid displays the vertical scrollbar. The pager is visible only if it contains the page size selector with the All item.

Note

The Grid renders all data rows simultaneously when the ShowAllRows property is set to true. This can cause performance issues if the Grid is bound to a large data source. In this case, use the VirtualScrollingEnabled property instead.

The following code snippet displays all Grid rows on one page:

@using Microsoft.EntityFrameworkCore
@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory
@implements IDisposable

<DxGrid Data="@Data"
        ShowAllRows="true">
    <Columns>
        <DxGridDataColumn FieldName="ShipName" />
        <DxGridDataColumn FieldName="ShipCity" />
        <DxGridDataColumn FieldName="ShipCountry" />
        <DxGridDataColumn FieldName="Freight" />
        <DxGridDataColumn FieldName="OrderDate" />
        <DxGridDataColumn FieldName="ShippedDate" />
    </Columns>
</DxGrid>

@code {
    object Data { get; set; }
    NorthwindContext Northwind { get; set; }

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Data = Northwind.Orders.Take(20).ToList();
    }

    public void Dispose() {
        Northwind?.Dispose();
    }
}

Blazor Grid All Rows on One Page

For more information about paging in the Grid component, refer to the following topic: Paging in Blazor Grid.

Implements

See Also