Vcl.DBGrids.TCustomDBGrid.GetColField

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function  GetColField(DataCol: Integer): TField;

C++

Data::Db::TField* __fastcall GetColField(int DataCol);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.DbGrids.pas
Vcl.DBGrids.hpp
Vcl.DBGrids TCustomDBGrid

Description

Returns the field component that represents the binding of a specified column.

Call GetColField to obtain the field component for a column in the data-aware grid. The DataCol parameter is the index of the column in the Columns property, where 0 is the first column, 1 is the second column, and so on.

Unlike the Fields property, GetColField will return field components for columns that do not represent fields in the dataset, such as calculated fields. GetColField will return nil (Delphi) or NULL (C++) if no field is associated with the column or if the dataset is not active.

See Also