TDBGrid状态栏用于列聚合 [英] TDBGrid status bar for column aggregate

查看:58
本文介绍了TDBGrid状态栏用于列聚合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

得到了一个包含一些数字列的网格,并且需要为每个列实现汇总(总和或计数)并将其显示在相应的列下.

Got a grid with some numeric columns and it's need to implement for each column an aggregate (sum or count) and display it under the corresponding column.

我知道某些套件(DevExpress或其他套件)已经默认"实现.但是有一种方法可以使用默认控件或JVCL来实现?

I know that some suites (DevExpress or other) had already implemented "by default". But there is a way to implement that using default controls or JVCL?

推荐答案

自从您提到 JEDI VCL ,请尝试查看 TJvDBGridFooter 组件.它是 TJvDBGrid 控件的状态栏.

Since you have mentioned JEDI VCL, try to take a look at the TJvDBGridFooter component. It is the status bar for the TJvDBGrid control.

  • you can modify the displayed text in the OnDisplayText event
  • you can calculate the aggregate fields in the OnCalculate event
  • you can follow the grid column scroll, resize or modify the appearence of the panels

从JVCL的 .. \ examples \ JvUltimDBGrid 文件夹中检查演示项目,以查看其运行情况.

Check the demo projects from JVCL's ..\examples\JvUltimDBGrid folder to see it in action.

这篇关于TDBGrid状态栏用于列聚合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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