Vcl.DBGrids.TCustomDBGrid.SelectedIndex
Delphi
property SelectedIndex: Integer read GetSelectedIndex write SetSelectedIndex;
C++
__property int SelectedIndex = {read=GetSelectedIndex, write=SetSelectedIndex, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Vcl.DbGrids.pas Vcl.DBGrids.hpp |
Vcl.DBGrids | TCustomDBGrid |
Description
Specifies the index of the currently selected column in the Columns array.
Set SelectedIndex to move focus to a column in the grid that is identified by position. Read SelectedIndex to determine which column in the grid has focus. A value of 0 indicates the first data column, 1 is the second data column, and so on. SelectedIndex is -1 if there is no currently selected column.
If the Options property includes dgIndicator, the index of the data column given by SelectedIndex will differ from the index of the physical column in the grid.
To access the field component for the selected column, use the SelectedField property.
See Also