Check if data is modified

What would be the best way to check if TDAMemDataTable has some pending changes?

function TfrmBrowseAllocation.GetSaveEnabled: Boolean;
begin
result := FALSE;
if not FDatamodule.dtAllocations.Active then exit;
if not Assigned(FDatamodule.dtAllocations.Delta) then exit;
FSaveEnabled := FDatamodule.dtAllocations.Delta.Count > 0;

you are using correct way.

1 Like