Skip to main content
A newer version of this page is available. .

DxGrid.PageSize Property

Specifies the maximum number of rows that the grid can display on a page.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public int PageSize { get; set; }

Property Value

Type Description
Int32

The number of rows.

Remarks

Use the PageSize property to specify the maximum number of rows displayed on a page. If you set this property to 0 or a negative value, the Grid displays one row on each page.

@inject WeatherForecastService ForecastService

<DxGrid Data="@Data" PageSize="5">
    <Columns>
        <DxGridDataColumn FieldName="Date" DisplayFormat="D" />
        <DxGridDataColumn FieldName="TemperatureC" Caption="@("Temp. (\x2103)")" Width="120px" />
        <DxGridDataColumn FieldName="TemperatureF" Caption="@("Temp. (\x2109)")" Width="120px" />
        <DxGridDataColumn FieldName="Forecast" />
        <DxGridDataColumn FieldName="CloudCover" />
    </Columns>
</DxGrid>

@code {
    object Data { get; set; }

    protected override void OnInitialized() {
        Data = ForecastService.GetForecast();
    }
}

Blazor Grid Page Size

Implements

See Also