ListView 使用 LiveBindings 显示超过 200 条记录

ListView 使用 LiveBindings 预设加载 200 条记录,这也许是速度的考量,但当需要全部加载的的情况时,该如何做呢?只需加入下面二行代码即可:

FDQuery1.OptionsIntf.FetchOptions.RecsMax := -1;
FDQuery1.OptionsIntf.FetchOptions.AutoFetchAll := afAll;

ps. 以上实测加载七万条记录,在 Windows 7 约要十几秒的时间。

参考资料:http://codeverge.com/embarcadero.delphi.firedac/getting-max-200-rows-from-tfdquery/1989036

posted @ 2014-12-09 08:54  龟山Aone  阅读(1395)  评论(1编辑  收藏  举报