From RAD Studio API Documentation
Jump to: navigation, search


property FieldKind: TFieldKind read FFieldKind write SetFieldKind default fkData;


__property TFieldKind FieldKind = {read=FFieldKind, write=SetFieldKind, default=0};


Type Visibility Source Unit Parent
property published
Data.DB TField


Indicates whether a field represents a column in a dataset, a calculated field, or a lookup field.

Use FieldKind to determine whether a field is a data field, a calculated field, a lookup field, or an aggregate field. The value of FieldKind can be changed programmatically, but in practice FieldKind is set at design time when creating Field components with the Fields editor.

Note: Fields calculated by SQL servers or the Borland Database Engine to display the results of a query that returns a live dataset have a FieldKind of fkInternalCalc, not fkCalculated. This is because the field values are stored in the dataset. Calculated fields in a client dataset that are calculated in an OnCalcFields event handler but stored in the dataset also have a FieldKind of fkInternalCalc instead of fkCalculated. Unlike regular calculated fields, internally calculated fields can be used in filter expressions. They can be edited, but the changes are discarded. To prevent editing, set the ReadOnly property to True.

Note: The FieldKind property of a field is only stored with the field object if the value is fkInternalCalc.

Note: For example, for Data.DB.TAggregateField, the FieldKind property is set to fkAggregate.

See Also