RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomDBGrid.GetColField Method

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

Pascal
function GetColField(DataCol: Integer): TField;
C++
__fastcall TField GetColField(int DataCol);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!