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

# TCustomDBGrid.SelectedIndex

Ordinal position of the selected column in the grid control.

## Declaration

Source position: dbgrids.pas line 558

`public property TCustomDBGrid.SelectedIndex : Integer read GetSelectedIndex write SetSelectedIndex;`

## Description

SelectedIndex is an Integer property that represents the ordinal position of the selected column in the grid control. The property value contains the result from ColumnIndexFromGridColumn when the Columns collection is enabled in the control. Otherwise, the value from FieldIndexFromGridColumn is used as the property value.

GetSelectedIndex is the read access specifier for the property value. SetSelectedIndex is the write access specifier for the property.