I have the following columns in a gridview, one is a date and the other one is a dollar amount. I applied the formatting and set the HtmlEncode property to false, however the values still come up unformatted:
<asp:BoundField DataField="Total" HeaderText="Total" ReadOnly="true" HtmlEncode="False" DataFormatString="{0:C}" />
<asp:BoundField DataField="Sale_Date" HeaderText="Sale Date" ReadOnly="true" HtmlEncode="False" DataFormatString = "{0:d}" />
This is how these values appear in the gridview:
The "Total" value comes up as: 190.0000 The Sale Date value comes up as: 9/2/2010 8:59:00 AM
Any suggestions?