DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
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:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us