WPF StringFormat [Numbers] on Culture Change

655 views Asked by At

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?}

0

There are 0 answers