Subject | DisplayFormat issue - EConvertError |
---|---|
Author | Joe |
Post date | 2010-11-13T01:35:21Z |
I am trying to use the DisplayFormat attribute to display a numeric value as curency (i.e. $12.33) in a TIB_Grid. The grid is attached to a TIB_Query.
I set the DisplayFormat to: $###,###,##0.00
When I have it set like that, if the grid attempts to display a value that has cents in it (that is, not a whole number), I get the following exception: "Project MYPROJECT.exe raised exception class EConvertError with message "1.45" is not a valid integer value"
If I remove the DisplayFormat setting, I don't get the exception.
The field in question is defined as a TIBOFloatField.
Did I set the DisplayFormat incorrectly? I copied that value out of a past post, because I could not find any documentation on DisplayFormat, so while we're at it, can someone point me to a reference that explains the syntax of this setting?
Thanks,
Joe
I set the DisplayFormat to: $###,###,##0.00
When I have it set like that, if the grid attempts to display a value that has cents in it (that is, not a whole number), I get the following exception: "Project MYPROJECT.exe raised exception class EConvertError with message "1.45" is not a valid integer value"
If I remove the DisplayFormat setting, I don't get the exception.
The field in question is defined as a TIBOFloatField.
Did I set the DisplayFormat incorrectly? I copied that value out of a past post, because I could not find any documentation on DisplayFormat, so while we're at it, can someone point me to a reference that explains the syntax of this setting?
Thanks,
Joe