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

# TCustomGrid.ColumnFromGridColumn

Returns the grid column definition at the specified position in Columns.

## Declaration

Source position: grids.pas line 1010

`protected function TCustomGrid.ColumnFromGridColumn(`
`Column: Integer`
`):TGridColumn;`

## Arguments

`Column` |  | Position in the visible and enabled non-fixed columns for the grid control.

## Function result

TGridColumn instance at the specified position, or Nil when Column is not a valid or enabled in the grid control.

## Description

ColumnFromGridColumn calls ColumnIndexFromGridColumn to convert the relative column number in Column to its ordinal position in the Columns property. It is relative because it refers to the n-th column which is not fixed and is both enabled and visible.

The return value contains the TGridColumn instance in Columns where the Column number was located. The return value is Nil if Column is not a valid relative column number, is not enabled, or is a fixed column on the grid control.