Recent

Author Topic: DisplayFormat in a TDBGrid column  (Read 6436 times)

AlZuur

  • New Member
  • *
  • Posts: 11
DisplayFormat in a TDBGrid column
« on: May 21, 2010, 05:42:31 pm »
I have table and in this table a float value. To display the float value nicely in a TDBGrid I use a DisplayFormat string "#.000 'cr'" which makes '0.36754' (the not-formatted text) look like '.367 cr' (the formatted text), which is what I need.

However, when I edit the cell the formatted text is sent in the editor, not the original value. The problem now is that I don't know the orignal value and if I don't remove the 'cr' part then the value is not recognized as a float value anymore.

I would say that the not-formatted text should be sent to the editor, so my questions are:
* Is sending the formatted text to the editor intended?
* If it is intended, what is the reasoning behind it?
* Is there a way to avoid sending the formatted text to the editor? Instead I want to send the not-formatted value.

Regards

 

TinyPortal © 2005-2018