I have a dataset with 6000 records.
If I just use:
TMSFNCGridDatabaseAdapter1.Active := True;
TMSFNCGridDatabaseAdapter1.LoadAllDataAndDisconnect;
The opening of my program will become very slow.
To work around this, I use the following code:
TMSFNCGrid1.BeginUpdate;
BufDataset1.DisableControls;
try
TMSFNCGridDatabaseAdapter1.Active := True;
TMSFNCGridDatabaseAdapter1.LoadAllDataAndDisconnect;
finally
BufDataset1.EnableControls;
TMSFNCGrid1.EndUpdate;
end;
And it works, the opening is almost instantaneous.
However, when using BeginUpdate / EndUpdate, most cells in the grid are not loaded.
I'm using Lazarus 2.0.6 r62129.