Skip to main content

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. If you pass 0 or a negative value, a MoveCurRecordTo procedure call has no effect.

Code 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
  try
    dxMemData1.MoveCurRecordTo(1);  // Moves the current record to the first position
  finally
    dxMemData1.EnableControls;  // Re-enables data synchronization with bound controls
  dxMemData1.First;  // Sets the moved record as current
See Also