Master / Detail - refresh detail

Hi

Using Delphi 12.2, RODA 10.0.0.1607

Is it possible to refresh a detail table in a master/detail setup when the master is in edit-mode?

According to the method FetchMasterDetails in uDADataTable (line 3441) this isn’t possible. Is there a reason for this?

  if (master.State = dsBrowse) and
    (
      (dtAllowFetchForNewMasterRecords in DetailOptions) or
      not(
        (MasterSource.DataTable.State = dsInsert) or
        (Active and MasterSource.DataTable.Delta.IsNewRecord2(MasterSource.DataTable)))
    ) then begin

Is there a workaround so I can refresh changes in the detail-table while the master remains in edit-mode?

Even if there are no changes made in the detail-table and I want to execute detail-table.refresh; I get an error Dataset: Cannot perform this operation on a closed dataset

Pls advice.

Regards,
Filip

Hi,

it should be possible with CloneSource feature.

You can use cloned source table as a detail table.
main table can refresh data with RefreshFromServer or RefreshRow like

l_old := table.DynamicWhere.Expression;
table.DynamicWhere.Expression := ...construct master filter like 'ID = mastertable.ID'...;
table.RefreshFromServer;
table.DynamicWhere.Expression := l_old;

or

table.RefreshRow;