A
Alan Silver
Hello,
I have a GridView control, and am unsuccessfully trying to format a
column to show costs. The (simplified) code is as follows...
<asp:GridView ID="grdCustomers" DataSourceID="dtaCustomers"
AutoGenerateColumns="false" runat="server">
<Columns>
<asp:BoundField DataField="Total" DataFormatString="£{0:F2}" />
</Columns>
</asp:GridView>
As you can see, I have set the DataFormatString to "£{0:F2}",
which should give them a Pound sign, followed by the value with two
decimal places (like you would expect a cost to look).
The problem is that the numbers are not being formatted correctly. I
have things like $23.9 (where I have changed the pound sign to a dollar
sign to ensure it shows up right in Usenet). This should show as $23.90,
with the extra zero.
Any ideas? TIA
I have a GridView control, and am unsuccessfully trying to format a
column to show costs. The (simplified) code is as follows...
<asp:GridView ID="grdCustomers" DataSourceID="dtaCustomers"
AutoGenerateColumns="false" runat="server">
<Columns>
<asp:BoundField DataField="Total" DataFormatString="£{0:F2}" />
</Columns>
</asp:GridView>
As you can see, I have set the DataFormatString to "£{0:F2}",
which should give them a Pound sign, followed by the value with two
decimal places (like you would expect a cost to look).
The problem is that the numbers are not being formatted correctly. I
have things like $23.9 (where I have changed the pound sign to a dollar
sign to ensure it shows up right in Usenet). This should show as $23.90,
with the extra zero.
Any ideas? TIA