Link to home
Start Free TrialLog in
Avatar of TrialUser
TrialUserFlag for Afghanistan

asked on

Format decimal as currency in gridview

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}" />
ASKER CERTIFIED SOLUTION
Avatar of Manoj Patil
Manoj Patil
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
TRY  "{0:C2}"
Avatar of TrialUser

ASKER

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