I want to add $Sign in my gridView column, I am using below code how to Dataformat string . Where can i apply this code
DataFormatString="{0:C}" HtmlEncode="false" and how to apply this code
<asp:TemplateField HeaderText="currentbalance">
<%
<%
<%
<%
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Deepak SharmaPosted Apr 4, 2012, 2:17 AM
You can use "{0:c}" as second parameter of Eval to add currency sign($) in a GridView column:
<%# Eval("currentbalance", "{0:c}") %>