FireDAC.Stan.Option.TFDFetchOptions.DetailDelay

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DetailDelay: Integer read GetDetailDelay  write SetDetailDelay stored IsDDS default 0;

C++

__property int DetailDelay = {read=GetDetailDelay, write=SetDetailDelay, stored=IsDDS, default=0};

Properties

Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option.pas
FireDAC.Stan.Option.hpp
FireDAC.Stan.Option TFDFetchOptions

Description

Controls the delay between master dataset scroll and detail dataset refresh.

Set the DetailDelay property value to the time in msecs.

After the master dataset is scrolled, the detail dataset will be refreshed after DetailDelay msecs. If another master dataset scrolling happens at that delay time, then the delay will be restarted. 

This is at first useful at master-detail relation, where a detail dataset must execute an SQL command against the database to query detail records. And the master dataset is attached to GUI, where the user can scroll through records. If a user presses and holds a navigation button, then the master dataset will scroll fast, but this property allows you to postpone detail dataset refreshing, until the master dataset scrolling is finished. 

FireDAC cannot distinguish whether a user or an application code is scrolling through the master dataset. Therefore, the programmer should make sure, in code, that the detail dataset contains records corresponding to the current master dataset record.

That can be done in the following ways:

  • Persistently disabling delayed refreshing - by setting DetailDelay to 0 and calling the Synchronize method.
  • One time synchronization - by calling the Synchronize method.

See Also