RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFieldDefs.Items Property

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

Pascal
property Items [Index: Integer]: TFieldDef;
C++
__property TFieldDef Items[int Index];

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: 

On Windows:

Label1.Caption := Table1.FieldDefs.Items[0].DisplayName;

On cross-platform:

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

On Windows:

Label1->Caption = Table1->FieldDefs->Items[0]->DisplayName;

On cross-platform:

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

 

Add 

AddFieldDef 

Clear 

Count 

operator_sb

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!