Data.DB.TFieldDefs.Items

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: property
Visibility: public
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TFieldDefs

Delphi

property Items[Index: Integer]: TFieldDef read GetFieldDef write SetFieldDef; default;

C++

__property TFieldDef* Items[int Index] = {read=GetFieldDef, write=SetFieldDef/*, default*/};

Description

Lists the field definitions that describe each physical field in the dataset.

Use Items to access a particular field definition. Specify the field definition to access with the Index parameter. Index is an integer identifying the field definition's position in the list of field definitions, in the range 0 to Count - 1.

For example, the following code displays the name of the first field definition in a label:

Label1.Caption := ClientDataSet1.FieldDefs.Items[0].DisplayName;
Label1->Caption = ClientDataSet1->FieldDefs->Items[0]->DisplayName;

See Also