shahnid k

shahnid k

  • NA
  • 61
  • 15.6k

Formatting no format to currency format in templt field of G

Dec 19 2016 6:42 AM
Hi,
i need to format the number format to currency format  of my gridview. Columns are template field. I have tried many methods like "{0:c}", etc. Here is my code. 
 
 
<asp:TemplateField HeaderText="Dec" SortExpression="December">
<ItemTemplate>
<asp:Label ID="Label12" runat="server"
Text='<%# Bind("Dec", "{0:#,0}") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="Label12" runat="server"
Text='<%# Eval("Dec", "{0:#,0}") %>'></asp:Label>
</EditItemTemplate>
<HeaderStyle CssClass="headergrid11" />
 
please help me to solve this.  
 

Answers (3)