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

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

问题描述

我在Delphi中使用了一个DBGrid组件。我想知道如何设置列的格式。我有真正的价值观,我想在网格中显示为货币。



有人知道如何?

解决方案


  1. 您可以设置 Field

  2. DisplayFormat 您可以处理 OnGetText 事件。这种方法允许使用该值进行更复杂的操作。


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.

Someone knows how?

解决方案

  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天全站免登陆