I have a memory ClientDataset (provider is not specified) with the connected DBGrid. I need to change some records without DBGrid scrolling:
with ClientDataset do
begin
DisableControls;
try
// changing some records
// and getting back
finally
Refresh; // missing data provider error
RefreshRecord; // missing data provider error
EnableControls;
end;
end;
Without Refresh DBGrid shows old data, without DisableControls the DBGrid is scrolling back and forth, Refresh causes error "missing data provider". Is there a way to properly organize it?