Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxGrid.ShowAllRowsChanged Event

Fires when the ShowAllRows property value changes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback<bool> ShowAllRowsChanged { get; set; }

#Parameters

Type Description
Boolean

The new ShowAllRows property value.

#Remarks

Enable the ShowAllRows option to display all Grid rows on one page. Note that if the Grid contains a large amount of data rows, this option can affect Grid performance.

Handle the ShowAllRowsChanged event to react when the ShowAllRows property value changes.

@inject WeatherForecastService ForecastService

<DxGrid Data="@Data" 
        ShowAllRowsChanged=@OnShowAllRowsChanged
        PageSizeSelectorVisible="true"
        PageSizeSelectorAllRowsItemVisible="true"
        PageSizeSelectorItems="@(new int[] {3,4,5})"
        @bind-PageSize=@PageSize>
    <Columns>
        <DxGridDataColumn FieldName="Date" />
        <DxGridDataColumn FieldName="TemperatureC" />
        <DxGridDataColumn FieldName="TemperatureF" />
    </Columns>
</DxGrid>

@Message

@code {
    object Data { get; set; }
    string Message { get; set; }
    int PageSize = 3;
    void OnShowAllRowsChanged(bool AllRows) {
        if (AllRows)
            Message = "All rows are visible";
        else
            Message = PageSize + " rows are visible";
    }

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