Gridview Formatting Issue : Bound Column

  • Thread starter Thread starter Just Me
  • Start date Start date
J

Just Me

I need a bound column to only show 2 decimals and I have used a
DataFormatString

<asp:BoundField DataField="order_total_Total" HeaderText="£Total"
SortExpression="order_total_Total" DataFormatString="{0:f2}" />



This however, still displays 4 decimal points,



Does anyone have a clue what may be going wrong ?



Cheers
 
I need a bound column to only show 2 decimals and I have used a
DataFormatString

<asp:BoundField DataField="order_total_Total" HeaderText="£Total"
SortExpression="order_total_Total" DataFormatString="{0:f2}" />

This however, still displays 4 decimal points,

Does anyone have a clue what may be going wrong ?

You've forgotten to include HtmlEncode="false"
 
Back
Top