TdxCustomMemData.RecIdField Property
Returns a pointer to the ‘RecId’ field of the ExpressMemData component.
Declaration
property RecIdField: TField read;
Property Value
Type |
---|
TField |
Remarks
The ‘RecId’ field is invisible and is created automatically during the creation of the ExpressMemData component. The RecIdField is a unique field.
Note
If you do not have a unique field and wish to use the grouping capabilities of the ExpressQuantumGrid™, use the ‘RecId’ field as a KeyField property of a lookup grid column.
Example
// Set a unique field after the insert operation
procedure TForm1.dxMemData1AfterInsert(DataSet: TDataSet);
begin
DataSet.FindField('id').AsInteger := DataSet.FindField('recid').AsInteger;
end;
Note
Use the RecIdField.FieldName property to modify the default name of the ‘RecId’ field to avoid conflicts when loading data or fields from another dataset via the CreateFieldsFromDataSet or AddFieldsFromDataSet method call.
See Also