Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomMemData.MoveCurRecordTo(Integer) Method

Moves the current record to a new position in the memory-based dataset.

#Declaration

Delphi
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: Rearrange Dataset Records

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