Hello,
I have 6 columns in my XamDataGrid that are decimals. I want to show 3 of them like 123.456 and 3 of them like 0,25
So in the xaml ;
<Style x:Key="DecimalStyle" TargetType="{x:Type igEditors:XamCurrencyEditor}"> <Setter Property="Format" Value="N"/> </Style>
<Style x:Key="DecimalStyle" TargetType="{x:Type igEditors:XamCurrencyEditor}">
<Setter Property="Format" Value="N"/>
</Style>
And in the code behind
if (each.DC.DataType.FullName == "System.Decimal") { fs.EditorStyle = (Style)FindResource("DecimalStyle"); }
if (each.DC.DataType.FullName == "System.Decimal")
{
fs.EditorStyle = (Style)FindResource("DecimalStyle");
}
At the result I am successful to show 3 of columns like 0,25. But other 3 columns are like 123.456,00
So how can I show that 3 columns like I want with no zeros at the right(123.456)
I am using (.) as a thousands seperator and (,) for remainders.
Thanks
Thank you for your post. I have been looking into it and I suggest you set the Format of the other Decimal Fields to “#,#”. Also you can look into this link from MSDN:
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx
where there are the standard numeric formats.
Hope this helps you.