[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Grids' (#lcl)

# TCustomGrid.RowCount

Number of rows in the grid.

## Declaration

Source position: grids.pas line 1285

`protected property TCustomGrid.RowCount : Integer read GetRowCount write SetRowCount default 5;`

## Description

RowCount is an Integer property which contains the number of rows in the grid control, including fixed and normal rows.

Changing the value in RowCount causes a visible Editor in the control to be hidden, and EditorMode is set to False. When the Columns collection is Enabled, the ColumnsChanged method is called. Setting RowCount to 0 (zero) causes the ClearRows method to be called.

Use ColCount to access the number of columns for the grid control when Columns has not been enabled.

Use Col and Row for the current cell selected in the control.

## See also

TCustomGrid.Col |  | Column index for the selected grid cell.
TCustomGrid.Row |  | Row number for the selected grid cell.
TCustomGrid.RowHeights |  | Provides indexed access to the height for each row in the grid.
TCustomGrid.RowCount |  | Number of rows in the grid.
TCustomGrid.Columns |  | Definitions for the columns displayed the grid.
TCustomGrid.Editor |  | The editor control used to modify the value in the current cell.
TCustomGrid.EditorMode |  | True when the Editor is ready to modify the value for the current cell.
TCustomGrid.ColumnsChanged |  | Performs actions needed when one or more columns in the grid are changed.
TCustomGrid.ClearRows |  | Clears the cached fixed rows and row count values for the grid control.