本文介绍了计算 TDbGrid 中的行数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 TDbGrid,我可以在运行时使用 FieldCount 属性轻松判断其中有多少列,但似乎没有相应的 RowCount 属性来显示正在显示的记录数.我怎样才能找到这个?
I have a TDbGrid, and I can easily tell how many columns are in it at runtime with the FieldCount property, but there doesn't seem to be a corresponding RowCount property to display how many records are being displayed. How can I find this out?
推荐答案
你可以试试:
DBGrid1.DataSource.DataSet.RecordCount
也许有更好的解决方案.但这对我有用.
Maybe there are better solutions. But this worked for me.
这篇关于计算 TDbGrid 中的行数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!