VS2005 and SQL2000
Have a column with Data Type "Float". Example, the value in the row could be
80025.36958
or
123.5
etc.
Using a Gridview, I want to force this column to return as currency.
1) I've tried {0:c}
This does absolutely nothing. Returns all the number as is.
2) I forced it to ruturn with ${0:c2}.
This will return the numbers with $ but does not round to 0.XX and if a
number does not have 0.XX like 123.5, then I only get $123.5 and I want to
get $123.50. Also, the 80025.36958 example from above returns as
$80025.336958. I want to make it seperate the thousands by comma. Basically,
I'm looking for the standard format of $80,025.37.
Can someone help?
Thanks!
Phil 4 3985
"Phillip Vong" <phillip_vong*at*yahoo*dot*comwrote in message
news:er**************@TK2MSFTNGP03.phx.gbl...
Can someone help?
{0:"#,##0.00"}
Mark,
Thanks for the reply, but that did not help at all. I'm still getting
results like 80025.336958.
Someone Please help. I'm doing this in VS2005.
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:eR**************@TK2MSFTNGP04.phx.gbl...
"Phillip Vong" <phillip_vong*at*yahoo*dot*comwrote in message
news:er**************@TK2MSFTNGP03.phx.gbl...
>Can someone help?
{0:"#,##0.00"}
"Phillip Vong" <phillip_vong*at*yahoo*dot*comwrote in message
news:eP**************@TK2MSFTNGP05.phx.gbl...
Mark,
Thanks for the reply, but that did not help at all. I'm still getting
results like 80025.336958.
Someone Please help. I'm doing this in VS2005.
Apologies - I didn't register the VS2005 bit...
In that case, you need to add HtmlEncode="false" into your HTML and all will
be well. http://geekswithblogs.net/ensoftblog.../02/58915.aspx
Mark, Thanks! You actually solved my problem by reminding me to make
HtmlEncode="False". I just left the format as {0:c} and everything worked.
Thanks!
"Mark Rae" <ma**@markNOSPAMrae.comwrote in message
news:O1**************@TK2MSFTNGP04.phx.gbl...
"Phillip Vong" <phillip_vong*at*yahoo*dot*comwrote in message
news:eP**************@TK2MSFTNGP05.phx.gbl...
>Mark, Thanks for the reply, but that did not help at all. I'm still getting results like 80025.336958.
Someone Please help. I'm doing this in VS2005.
Apologies - I didn't register the VS2005 bit...
In that case, you need to add HtmlEncode="false" into your HTML and all
will be well.
http://geekswithblogs.net/ensoftblog.../02/58915.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: news.wanadoo.nl |
last post by:
Hi,
Is there a sollution for a DataFormatString as currency that shows always
the euro sign: ?
<asp:BoundColumn DataField="UnitCost" HeaderText="Prijs"...
|
by: cntams |
last post by:
Hi all,
I have a Web Form and using BoundColumn to bind data to the
datagrid.
I have 2 fields that needs to be formatted. The first one is a
DateTime field and the second one is the currency...
|
by: .Net Sports |
last post by:
I'm trying to display a figure in my datagrid as a currency ($100.00),
but I can't use DataFormatString inside templatecolumn, itemstyle, or
itemtemplate (as they imply that no attribute named...
|
by: Hardy Wang |
last post by:
Hi, I have a GridView control in my web form (ASP.NET 2.0)
<asp:GridView ID="gvReport" runat="server" AllowSorting="True"
AutoGenerateColumns="False"
Width="100%">
<HeaderStyle...
|
by: Amelyan |
last post by:
When I try to apply {0:d} to date or {0:c} to number (for currency), my
GridView doesn't apply the format. It still shows DateTime as it comes from
database with time and currency as just a number...
|
by: yefei |
last post by:
I want to display a BoundField "Price" in the format of currency in a
GridView
I set the DataFormatString="{0:C}" in my program
However, it doesnot work.
I try to add a '$'in from of the brace,...
|
by: Rob Roberts |
last post by:
I have a GridView that is bound to a collection of DateTimes (i.e. -
Collection<DateTime>). I have a BoundField in the GridView, and its
DataField is set to the DateTime's Date property, and the...
|
by: Paulo |
last post by:
Hi, can you help me how to display R$ 2,80 on the GridView BoundField?
The data comes from a DataBase, but it shows me: 2,8000
I want to display R$2,80 wich is the currency of my country! What...
|
by: pvong |
last post by:
I have a Gridview that I want to format the values so it looks like this.
Currently What I Want
25.6 25.60%
1.2 1.20%
100 100.00%
...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |