all groups > asp.net datagrid control > august 2004 >
You're in the

asp.net datagrid control

group:

DataFormatString shows currency, but without commas


DataFormatString shows currency, but without commas Don
8/25/2004 7:00:57 PM
asp.net datagrid control:
Hi,=20

How do I get the commas into my datafield if it is a currency. I am =
dealing with hundred thousands, so it would really help out the user if =
I had commas.

Heres' what I am currently using in my BoundColumn: =
DataFormatString=3D"${0:C}".

Re: DataFormatString shows currency, but without commas Raghavendra T V
8/26/2004 12:20:58 PM
Hi Don,

You can try this.

<asp:BoundColumn DataField=3D"ytd_sales" HeaderText=3D"Sales"
DataFormatString=3D"{0:#,###}"
ItemStyle-HorizontalAlign=3D"Right"
ItemStyle-Width=3D"15%" />

Thanks
Raghavendra


[quoted text, click to view]
Hi,=20

How do I get the commas into my datafield if it is a currency. I am =
dealing with hundred thousands, so it would really help out the user if =
I had commas.

Heres' what I am currently using in my BoundColumn: =
DataFormatString=3D"${0:C}".

AddThis Social Bookmark Button