Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to format to dollar sign

Status
Not open for further replies.

yosie2007

Technical User
Joined
Jun 23, 2007
Messages
46
Location
US
How can I format this boundfield to add a dollar sign infront of the returning rows like from 4000 to $4000.00 thanks

<asp:BoundField DataField="EngineersPrice" HeaderText="Engineers Estimate" DataFormatString="{0:d}" >
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
 
thanks guys got it to work.
 
Ok Mark,
here is the solution.I forgot to include this HtmlEncode="False" and change to this. DataFormatString="{0:c}



<asp:BoundField DataField="EngineersPrice" HeaderText="Engineers Estimate" DataFormatString="{0:c}" HtmlEncode="False" >
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top