在 Delphi 中设置 DBGrid 列格式 [英] Setting a DBGrid column format in Delphi

查看:23
本文介绍了在 Delphi 中设置 DBGrid 列格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Delphi 中使用 DBGrid 组件.我想知道如何设置列的格式.我有想要在网格中显示为货币的真实值.

I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid.

有人知道吗?

推荐答案

  1. 可以设置Field
  2. DisplayFormat
  3. 您可以处理 OnGetText 事件.这种方法允许对值进行更复杂的操作.
  1. You can set the DisplayFormat of the Field
  2. You can handle OnGetText event. This approach allows to do more complex operations with the value.

这篇关于在 Delphi 中设置 DBGrid 列格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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