Skip to main content
I don’t get the correct format when binding a decimal value in a DataGrid Column with ConverterCulture=de-CH. I think that the resulting format is correct for Germany but not for Switzerland. Can anybody help?
I don’t get the correct format when binding a decimal value in a DataGrid Column with ConverterCulture=de-CH. I think that the resulting format is correct for Germany but not for Switzerland. Can anybody help?
I did create a support incident 2793787.

I don’t get the correct format when binding a decimal value in a DataGrid Column with ConverterCulture=de-CH. I think that the resulting format is correct for Germany but not for Switzerland. Can anybody help?

I do as follows: Real currency (Brazil)

Decimal-point is comma.

01 wsPreco pic 9 (06) V99.

*> Datagridview column vrPreco / DefaultCellStyle / behavier format = C2

invoke self::dataGridView1::Rows::Add(... wsPreco)

Check also the regional system options

Hope this helps


I don’t get the correct format when binding a decimal value in a DataGrid Column with ConverterCulture=de-CH. I think that the resulting format is correct for Germany but not for Switzerland. Can anybody help?

Of course I do this in XAML. Here the column Definition:

                   <DataGridTextColumn MinWidth="100"

                                       Binding="{Binding Path=EingBetrag, StringFormat=N02, ConverterCulture=de-CH, Mode=TwoWay}"

                                       Header= "Betrag">

                       <DataGridTextColumn.HeaderStyle>

                           <Style>

                               <Setter Property="Label.HorizontalContentAlignment" Value="Right" />

                           </Style>

                       </DataGridTextColumn.HeaderStyle>

                       <DataGridTextColumn.CellStyle>

                           <Style>

                               <Setter Property="TextBlock.TextAlignment" Value="Right" />

                           </Style>

                       </DataGridTextColumn.CellStyle>

                   </DataGridTextColumn>

I can convert with ::ToString("N02") and bind this field, but than a sort by this column gives a incorrect result.