如何刷新的DBGrid没有在delphi关闭和打开的数据集?数据、DBGrid、delphi

2023-09-10 17:20:51 作者:多喜欢你

我需要刷新的DBGrid不断,实时。关闭和打开的数据集工作正常,但闪烁的DBGrid。我能做些什么,以避免这种情况?

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.

感谢

推荐答案

您是否尝试过使用禁止 - &功放; EnableControls

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

此外,应当有可能只是调用,而不是关闭和开启DataSet.Refresh得到相同的结果。

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