Show: Delphi C++
Display Preferences

Vcl.DBGrids.TCustomDBGrid.SelectedIndex

From RAD Studio API Documentation
Jump to: navigation, search

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


Code Examples

Personal tools
In Other Languages
Previous Versions
Assistance