Formatting Money Property to 2 Decimal Places in Customer and Orders Manager

Hi there,

Just a quickie (hopefully!):

I've created a custom field called 'Credit Limit' for the User Object that I have defined as being of type 'Currency' in Commerce Server Manager and that is mapped to a Database field of type 'Money'. So far, so good but the problem is that when I view this value in Commerce Server Customer and Orders manager, the value entered is displayed to 4 decimal places and I want it to 2. I know a simple solution would be to change the field definition to type 'Decimal' but I refuse to believe that there's no way of formatting the User Object or indeed the PresentationInfo.xml file so that this property only displays to 2 decimal places.

Failing that, I will have to admit defeat and change the field definition to a Decimal (even though it is strictly speaking a money object).

Thanks in advance,

Sean

[1044 byte] By [MeAndMyMonkey] at [2008-1-7]
# 1

Quicky.

{0:c}

if in a gris look for the property of the column called DataFormatString.

or if in code

string.Format("{0:c}", [your string here]);

AcynoniX at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 2

Thanks!

Forgive my ignorance but what is a gris?

MeAndMyMonkey at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 3
a Gris is a Grid that's incorrectly spelt

S is very close to D on the keyboard

Hoonius at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 4

Sorry to be such a dumbass but which grid should I be looking in?

Thx!

MeAndMyMonkey at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...
# 5

My Badd, I replied without throutly understanding your post and I was with the assumption that you were trying to format a field in the "Page" Customer order, witch is not the case here.

I'm sorry. :-S

I dont think you can format how a field is displayed in the applications...

AcynoniX at 2007-10-2 > top of Msdn Tech,Commerce Server,Commerce Server 2007...