Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh dbgrid without close and open dataset in delphi?

I need to refresh dbgrid constantly, in real time. Close and open dataset works fine, but blink the dbgrid. What can I do to avoid this?

I'd like a solution like Ajax, that update only the necessary.

Thanks

like image 693
Daniel Grillo Avatar asked Feb 22 '10 13:02

Daniel Grillo


1 Answers

Have you tried to use Disable- & EnableControls?

DataSet.DisableControls;
try
  DataSet.Close;
  DataSet.Open;
finally
  DataSet.EnableControls;
end;

Furthermore, it should be possible to just call DataSet.Refresh instead of closing and opening to get the same result.

like image 59
Lieven Keersmaekers Avatar answered Nov 17 '22 08:11

Lieven Keersmaekers