Format decimal as currency in gridview

Posted on 2012-09-05
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

    LVL 6

    Expert Comment

    TRY  "{0:C2}"

    Author Comment

    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

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now