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

# TCustomGrid.GetColumnTitle

Gets the text displayed as the column title for the specified column number.

## Declaration

Source position: grids.pas line 1094

`protected function TCustomGrid.GetColumnTitle(`
`Column: Integer`
`):string;`

## Arguments

`Column` |  | Column number for the title text.

## Function result

Text displayed in the title for the column.

## Description

GetColumnTitle is a String function used to get the text displayed as the column title for column number specified in Column. ColumnFromGridColumn is called to get the non-fixed TGridColumn instance at the specified position in the Columns collection.

If a column exists at the position in Column, the Caption stored in its Title property is used as the return value. If Column does not represent a valid non-fixed column position, or the Columns collection has not been enabled, the value from the GetDefaultColumnTitle method is used as the return value.

GetColumnTitle is called from the DrawColumnText method when the image and text for the column header is drawn.