0

I am using WPF StringFormat to format a Number Column inside a DataGrid. If my Localization is in "en-US", then I am able to apply period(.) for decimals. If I save my form. I then procede to change the Localization over to "es-ES", open the form to find out that the number is displayed incorrectly, but it is correctly saved in the database.

Specific Example:

Price Table (DataTable during input) 192.92 Secondary Issue: If during input I am localized into Spanish, I am not able to use the [,] as Decimal Seperator. Instead I am forced to use [.]. I would like to use whatever the culture deems correct as Decimals and Thousands seperator.

Price Table (Raw Data in Database) 192.92

Price Table (DataTable upon changing Localization) 19,292

XAML IS AS FOLLOWS:

<DataGridTextColumn Binding="{Binding value, StringFormat{}{0:N}}"/>

Any ideas how to overcome this issue?}

Abhishek Shah
  • 145
  • 2
  • 11
  • have you tried this http://stackoverflow.com/questions/21285197/can-cs-string-currency-format-optionally-up-to-6-decimal-numbers – user2526236 Jun 22 '15 at 21:09
  • not quite what i was looking for. basically i am having issues when displaying data back, but hard coding it seems too much. I need xaml to realize that the data is in en-US and convert it into es-ES automatically. – Abhishek Shah Jun 22 '15 at 21:24

0 Answers0