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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Deepak SharmaRank #541 · 4.5K reputationPosted Apr 3, 2012, 10:17 PM EDT
You can use "{0:c}" as second parameter of Eval to add currency sign($) in a GridView column:
<%# Eval("currentbalance", "{0:c}") %>