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

# TCustomGrid.DrawRow

Draws the columns for the specified row in the grid control.

## Declaration

Source position: grids.pas line 1069

`protected procedure TCustomGrid.DrawRow(`
`aRow: Integer`
`); virtual;`

## Arguments

`aRow` |  | Row number drawn in the method.

## Description

DrawRow is a method used to draw the columns for the row number specified in ARow. DrawRow calls ColRowToOffSet to get the upper and lower bounds for the row, and ensures that the bounds are within the clipping area for the control Canvas.

No actions are performed in the method when the client area for the row does not fit within the clipping rectangle for the control Canvas.

DrawRow iterates over the columns in the visible area in the grid to determine if each cell fits vertically within the clipping rectangle for the control Canvas. If column spanning (goColSpanning) has been enabled in the Options for the grid, the cell extent is determined for each cell. DoDrawCell is called to render the cells.

DrawRow draws the focus rectangle for the row when row selection (goRowSelect) is enabled in the Options for the grid control. DrawFocusRect is called to render the focus rectangle.

DrawRow draws fixed cells used for title columns when the row is one of the fixed rows.

DrawRow is called from the DrawAllRows method.