有没有可以快速处理大型数据集的DBGrid组件?
大型数据集、数百万条记录需要特殊编程来保持 DBGrid 的速度。
我想知道是否有任何现成的 Delphi (DBGrids) 组件可以自动执行此操作?
编辑例如:某些数据库具有获取第 1 X 条记录(例如 100 条记录)等功能。 当我滚动到底部时,我想自动获取下一个 100。相反,当我到达开头时,我想获取前 100 个。我知道我可以对此进行编程,但肯定可以将该功能传播到DBGrid 控件由 DBGrid 进行缓冲。 它将节省相当多的编程时间——可以这么说,您只需设置“缓冲区大小”即可。
Large datasets, millions of records, need special programming to maintain speed in DBGrids.
I want to know if there are any ready-made components for Delphi (DBGrids) that do this automatically?
EDIT For Example: Some databases have features such as fetch 1st X records (eg 100 records). When I reach the bottom with scrolling, I want to auto fetch the next 100. Conversely when I reach the beginning, I want to fetch the previous 100. I know I can program this, but it sure is possible to propagate that feature to a DBGrid control where the DBGrid does the buffering. It will save quite a bit of programming - you simply have to set the "buffer size" so to speak.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可能想看看精彩的(免费、开源、双重许可为 MPL 1.1 和 GPL,因此可在闭源应用程序中使用)Virtual TreeView 及其用户提供的后代(向下滚动页面找到它们。)
编辑以反映问题的编辑:Virtual TreeView 不仅允许您处理数百万个节点而不将它们保留在内存中,而且实际上这是使用它的首选方式。 您可以在需要时通过事件回调提供数据,并且可以告诉树缓存该数据(或不缓存)。
哦,当然它还有一个网格/报告模式,可以用作表格(只需设置GridExtensions 属性设置为 True。)
You might want to take a look at the wonderful (free, open source, dual licensed as MPL 1.1 and GPL thus usable in closed source apps) Virtual TreeView and its user-supplied descendants (scroll down the page to find those.)
Edit to reflect the question's edit: Virtual TreeView not only allows you to handle millions of nodes without keeping them in memory, but that is in fact the preferred way of using it. You supply the data through event callbacks when it's needed, and you can tell the tree to cache that data (or not.)
Oh, and of course it also has a grid / report mode where it can function as a table (just set the GridExtensions property to True.)
我想看看 Developer Express QuantumGrid Suite。 (@birger:你只是快了一点;-))所以我不仅仅是重复答案,而是进行一些阐述:
DevExpress 网格使用一个数据控制器,它有多种模式来控制绑定到网格的数据。 其中之一正是您正在寻找的:
它确实有一些缺点,这些缺点似乎非常明显:如果您手头没有所有记录,则无法进行汇总、排序或过滤。
I would have a look at Developer Express QuantumGrid Suite. (@birger: you just were a tick faster ;-) ) So I'm not just duplicating the answer, some elaboration:
The DevExpress Grid uses a data controller that has several modes to controll the data bound to the grid. One of these is exactly what you are looking for:
It does have some drawbacks, which seem pretty obvious: you cannot make a summary, sort, or filter if you do not have all records at hand.
NextGrid 是 Delphi 的轻量、快速且美观的网格
http://www.bergsoft .net/component/next-grid/features.htm
NextGrid is light, fast and nice looking grid for Delphi
http://www.bergsoft.net/component/next-grid/features.htm
我认为 DevExpress Quantumgrid 对此支持得很好。
I think the DevExpress Quantumgrid supports this very good.
抱歉,我刚刚看到您对 Neftalí 的评论,
如果您每次携带 100 条记录,然后获取下 100 条,这项工作与数据库访问组件相关,请查看 devart 组件,它们是直接提供的访问最常用数据库的组件,它们具有您所询问的功能以及更多功能:
http:// /www.devart.com/products-vcl.html
sorry, I just saw your comment to Neftalí
if you would to bring 100 record per time, and then fetch the next 100, this work related to database access components, look at devart components, they are offer direct access components to most used database, and they have the feature you are asking about and more:
http://www.devart.com/products-vcl.html