IDARangeController

Overview

The IDARangeController interface represents functions for working with a range of records in a specified dataset.

For example, in the TDAMemDataTable, the IDARangeController interface is realized in the following way:

TDAMemDataTable = class(TDADataTable,IDAMemDatasetBatchAdding,IDARangeController)
private
  fMemDataset: TDAMemDataset;
public
  constructor Create(aOwner: TComponent); override;

  {IDARangeController }
  procedure SetRange(const StartValues, EndValues: array of const); {$IFNDEF FPC_SAFECALL_BUG}safecall;{$ENDIF}
  ...
end;

constructor TDAMemDataTable.Create(aOwner: TComponent);
begin
  inherited;
  fMemDataset := TDAMemDataset(Dataset);
end;

procedure TDAMemDataTable.SetRange(const StartValues,
  EndValues: array of const);
begin
  fMemDataset.SetRange(StartValues, EndValues);
end;
...

Location


Required Methods


ApplyRange  safecall

Applies a range of records to the data table. Only those records that fall within the range should be available in the application for viewing and editing.

procedure ApplyRange

CancelRange  safecall

Removes any ranges currently in effect for the current data table.

procedure CancelRange

EditRangeEnd  safecall

Enables the changing of the ending value for an existing range.

procedure EditRangeEnd

EditRangeStart  safecall

Enables the changing of the starting value for an existing range.

procedure EditRangeStart

SetRange  safecall

Sets the starting and ending values of a range and applies it to the specified dataset.

procedure SetRange(const StartValues: array of const; const EndValues: array of const)

Parameters:

  • StartValues: Field values that represent the first record in the range
  • EndValues: Field values that represent the last record in the range

SetRangeEnd  safecall

Indicates that subsequent assignments to field values specify the end of the range of rows to include in the dataset.

procedure SetRangeEnd

SetRangeStart  safecall

Indicates that subsequent assignments to field values specify the start of the range of rows to include in the dataset.

procedure SetRangeStart