Reputation: 1
I recently moved to firemonkey framework programming and I am facing a strange behavior with grid and disablecontrols and enablecontrols.
As i should i call clientdataset.disablecontrols, before clientdataset update, in order to avoid display to the grid and speedup the operation. Finally i call enablecontrols in order to update the grid.
My problem is that after enablecontrols call the grid is not properly refreshed. Either i miss records either i miss data. But only the display is wrong. The underlying data are correct. I checked with the debuger.
I can force the update of the grid by update something in the clientdataset (without disablecontrols/enablecontrols) but i don't think this is the proper way.
Is this a bug or am i missing something with firemonkey?
Upvotes: 0
Views: 429
Reputation: 964
In Firemonkey please use next code:
Grid1.BeginUpdate
try
// creating rows in Grid
finally
Grid1.EndUpdate;
end;
Upvotes: 1