如何使用LiveBindings在TStringGrid中显示200行? [英] How to show more than 200 rows in TStringGrid using LiveBindings?

查看:205
本文介绍了如何使用LiveBindings在TStringGrid中显示200行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 TDataSource ,由 TClientDataset 支持,绑定到 TStringGrid 。我通过右键单击网格,选择链接到数据库数据源... ,并选择DataSource。这个设置为我的LiveBindings。

I have a TDataSource that is backed by a TClientDataset bound to a TStringGrid. I did this by right-clicking on the grid, selecting "Link to DB Datasource...", and selecting the DataSource. This setup the LiveBindings for me.

当我运行应用程序时,网格只填充200行,即使数据集中有5000条记录。

When I run the application, the grid only fills with 200 rows, even though there are 5000 records in the dataset.

我无法找到任何有关如何更改显示的行数的文档,或者正确的方式允许用户滚动所有数据。

I'm unable to find any documentation regarding how to change the number of rows displayed or the proper way to allow the user to scroll through all of the data.

我在单元中的 TBindScopeDBEnumerator.Create 中找到了硬编码的 200 Data.Bind.DBScope ,当我将其增加到 10000 时,我看到网格中的所有5000行,但这似乎是一个黑客。

I did find the hard coded 200 value in TBindScopeDBEnumerator.Create in the unit Data.Bind.DBScope, and when I increase it to 10000, I see all 5000 rows in the grid, but this seems like a hack.

在TStringGrid中显示200行以上的正确方法是什么?

What's the proper way to show more than 200 rows in a TStringGrid?

推荐答案

您需要将设计时的TBindDBGridLink.BufferCount从-1更改为您需要的任何值。

You need to change the TBindDBGridLink.BufferCount at designtime from -1 to whatever value you need.

这篇关于如何使用LiveBindings在TStringGrid中显示200行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆