TdxCustomMemData.MoveCurRecordTo(Integer) Method
Moves the current record to a new position in the memory-based dataset.
Declaration
procedure MoveCurRecordTo(AIndex: Integer);
Parameters
Name | Type | Description |
---|---|---|
AIndex | Integer | The target position (as an ordinal number) in the memory-based dataset. |
Remarks
Call the MoveCurRecordTo
procedure to move the current record to any position in the memory-based dataset. To identify the number of records stored in the dataset, use the RecordCount property.
Note
The MoveCurRecordTo
procedure accepts only positive numbers as the AIndex
parameter. Otherwise, a MoveCurRecordTo
procedure call has no effect.
Example
The following code example moves the current record to the beginning of the memory-based dataset.
dxMemData1.DisableControls; // Disables data synchronization with bound controls
dxMemData1.MoveCurRecordTo(1); // Moves the current record to the first position
dxMemData1.EnableControls; // Re-enables data synchronization with bound controls
dxMemData1.First; // Sets the moved record as current
See Also