William Adams
unread,Jun 30, 2009, 12:16:28 PM6/30/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to bs...@googlegroups.com
I am sure many may have encountered this issue in VS 2008, working with .NET 3.5 web apps.
The issue is using "dataformatstring" for a gridview's boundfield. I have a number like 123,000,000, which I want displayed as 123 million. ToString("0,, million") achieves this nicely elsewhere for a label with numbers coming from another datasource. {0:0,, million} fails to work in the boundfield dataformatstring property (same for {0,, million}). For the time being, I have resorted to having the particular datasource query dividing this number by 1 million, and then the dataformatstring property for that column set to {0:0 million}. This to me just seems wrong, but achieves the desired end result.
Would anyone happen to have some insight that might help me understand how I could better achieve this? Everywhere in google is the same thing: set htmlencode = false and/or htmlencodeformatstring = false. This has not resolved it at all for me.
Thanks