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

TCustomDBGrid.SelectedField

Field that reads and writes data for the currently selected column.

Declaration

Source position: dbgrids.pas line 561

public property TCustomDBGrid.SelectedField : TField
  read GetCurrentField
  write SetCurrentField;

Description

SelectedField is a TField property with the Field used to read and write data for the selected column in the grid control. SelectedField is updated when column navigation occurs in the control.

GetCurrentField is the read access specifier for the property, and returns the TField instance derived by GetFieldFromGridColumn for the selected column. SetCurrentField is the write access specifier for the property, and stores the new Field value as the selected column. No action is performed if the new Field value is the same as the current value for the property.

SelectedField is used in the implementation of various method in the control, such as: KeyDown, SelectEditor, UpdateData, and SwapCheckBox.

Use SelectedColumn to get the TColumn instance for the currently selected cell in the grid control.


Version 3.2 Generated 2024-02-25 Home