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
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.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.