DxGrid.GetVisibleRowCount() Method
Gets the total number of visible rows in the grid.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public int GetVisibleRowCount()
Returns
| Type | Description |
|---|---|
| Int32 | The number of visible rows. |
Remarks
The GetVisibleRowCount method returns the number of visible rows displayed in all grid pages. This number includes data rows and group rows (if data is grouped), but does not include filtered out rows and rows in collapsed groups. Refer to Row Visible Indexes for additional information.
@using Grid.Data
@inject WeatherForecastService ForecastService
<DxGrid Data="Data"
@ref="MyGrid">
<Columns>
<DxGridDataColumn FieldName="Date"
DisplayFormat="D" />
<DxGridDataColumn FieldName="TemperatureC" />
<DxGridDataColumn FieldName="TemperatureF" />
<DxGridDataColumn FieldName="Forecast"
GroupIndex="0" />
<DxGridDataColumn FieldName="CloudCover" />
</Columns>
</DxGrid>
<p />
<DxButton Click="OnGetVisibleRowCount">Get Visible Row Count</DxButton>
<p />
@Alert
@code {
IGrid MyGrid { get; set; }
object Data { get; set; }
string Alert { get; set; }
int count;
protected override void OnInitialized() {
Data = ForecastService.GetForecast();
}
void OnGetVisibleRowCount() {
count = MyGrid.GetVisibleRowCount();
Alert = "The visible row count equals " + count;
}
}

For additional information about paging in the Grid component, refer to the following topic: Paging in Blazor Grid.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetVisibleRowCount() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.