Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Format decimal as currency in gridview

Posted on 2012-09-05
Medium Priority
Last Modified: 2012-09-17
I have a decimal field I trid to display as currency ($12.89) using the following code, but no effect. Please suggest:
<asp:BoundField DataField="Price" HeaderText="Price" DataFormatString="{0:c}" />
Question by:TrialUser
LVL 19

Accepted Solution

Manoj Patil earned 2000 total points
ID: 38369846

Expert Comment

ID: 38369999
TRY  "{0:C2}"

Author Comment

ID: 38370752
None of the above works. Please help.

I would like to make it a boundfield and not a template field, due to other code that exists. Thanks

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question