Wayne,
Look at the String.Format function. You'll also want to search for "Standard
Numeric Format String".
What you want will be similar to this (although I do most programming in
VB.NET but this will be similar):
String.Format("This is the amount: {0:N}", MyInt)
Here's an excerpt from the MSDN Library's Standard Numeric Format Strings
entry:
N or n Number The number is converted to a string of the form
"-d,ddd,ddd.ddd...",
where each 'd' indicates a digit (0-9). The
string starts with a minus sign
if the number is negative. Thousand
separators are inserted between
each group of three digits to the left of the
decimal point. The precision
specifier indicates the desired number of
decimal places. If the precision
specifier is omitted, the default numeric
precision given by the
NumberFormatInfo is used.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<Th********@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I need to turn 40000 in to 40,000 for display.
Is there a way to do this directly in the Gridview and I'm just not
seeing it?
or do I have to use a TemplateField and do my own Formatting?
How would I in C# do the formatting? Is there something in
Int.ToString() that would format it for me?
i've not had any luck with google or the help thus far.
Thanks
Wayne