0

Here in this column I want to show $1234.56 as $1,234.56.

How do I modify $0.00 to do this?

<dx:GridViewDataTextColumn FieldName="30DayCost" 
                           Caption="30DayCost" 
                           VisibleIndex="9" Width="100px">
    <HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
    <CellStyle HorizontalAlign="Right"></CellStyle>
    <PropertiesTextEdit DisplayFormatString="$0.00"></PropertiesTextEdit>
</dx:GridViewDataTextColumn>
Chris Moutray
  • 18,029
  • 7
  • 45
  • 66
Adams
  • 195
  • 1
  • 10
  • I don't understand your question. Anyone? – Soner Gönül Mar 05 '14 at 19:56
  • possible duplicate of [.NET String.Format() to add commas in thousands place for a number](http://stackoverflow.com/questions/105770/net-string-format-to-add-commas-in-thousands-place-for-a-number) – David Mar 05 '14 at 19:57
  • please remove the negative vote, this is a coding question from a newbie. come on. – Adams Mar 05 '14 at 20:08

1 Answers1

2

Change the DisplayFormatString format from $0.00 to $#,##0.00.

Markus
  • 20,838
  • 4
  • 31
  • 55
  • What about cultures which have a different thousands separator? – jdphenix Mar 05 '14 at 20:00
  • 2
    @jdphenix: both the thousands and the decimal separator will be adjusted to the culture. See http://ideone.com/LMcTfR for a sample for de-DE. – Markus Mar 05 '14 at 20:04