|
|
|
start date: Sun, 8 Jul 2007 22:08:46 -0600,
posted on: microsoft.public.dotnet.framework.aspnet.datagridcontrol
back
| Thread Index |
|
1
Kat
|
|
2
martin marinov
|
|
3
Kat
|
|
4
marss
|
DataFormatString for currency?
I have tried to set a gridview column to have a dataformatstring of {0:c2},
{0:c},{0:d2, {0:d}, none of which work, my values are still displaying as
19.0000. I want it to be 19.00 like any normal currency. Thank you for
your help.
Date:Sun, 8 Jul 2007 22:08:46 -0600
Author:
|
Re: DataFormatString for currency?
Hello Kat,
Are you sure that your seetings for the currency use dot for delimiter?
Martin
> I have tried to set a gridview column to have a dataformatstring of
> {0:c2}, {0:c},{0:d2, {0:d}, none of which work, my values are still
> displaying as 19.0000. I want it to be 19.00 like any normal
> currency. Thank you for your help.
>
Date:Mon, 9 Jul 2007 07:53:04 +0000 (UTC)
Author:
|
Re: DataFormatString for currency?
Not sure what you mean, when I use currency formats in other programs, such
as Excel, it works fine. What should I check?
"martin marinov" wrote in message
news:21d2713946f38c9902e75e1db47@msnews.microsoft.com...
> Hello Kat,
>
> Are you sure that your seetings for the currency use dot for delimiter?
>
> Martin
>
>> I have tried to set a gridview column to have a dataformatstring of
>> {0:c2}, {0:c},{0:d2, {0:d}, none of which work, my values are still
>> displaying as 19.0000. I want it to be 19.00 like any normal
>> currency. Thank you for your help.
>>
>
>
Date:Mon, 9 Jul 2007 08:10:06 -0600
Author:
|
Re: DataFormatString for currency?
Kat wrote:
> Not sure what you mean, when I use currency formats in other programs, such
> as Excel, it works fine. What should I check?
You did everything right. But there is a feature that is poorly
described in guides. If you want to use DataFormatString then you have
to set
HtmlEncode to false.
<asp:BoundField .... HtmlEncode="False" DataFormatString="${0:C2}"/>
Regards, Mykola
http://marss.co.ua
Date:Tue, 10 Jul 2007 00:04:04 -0700
Author:
|
|
|