When number is big, the comma (,) is lost. for example, 3983,256,580.22 istead of 3,983,256,580.22
I am binding the query result to the xmlDataGrid directlty.Thanks!Steve
Hi Steve,
This is because you are using the default Mask on the XamCurrencyEditor.I suggest you to set a different mask as a style :
<Style TargetType="{x:Type igEditors:XamCurrencyEditor}" x:Key="CurrencyStyle"> <Setter Property="Mask" Value="{}{currency:10.2:c}" /></Style>
<igDP:Field Name="CurrencyValue"> <igDP:Field.Settings> <igDP:FieldSettings EditAsType="{x:Type sys:Decimal}" EditorType="{x:Type igEditors:XamCurrencyEditor}" EditorStyle="{StaticResource CurrencyStyle}" /> </igDP:Field.Settings></igDP:Field>
Regards
Vlad
Hi Vlad,
I am binding the result set automatically, so no indiviual field specified in xaml. How can I set the mask for all XmlDataGrid?
Thabks!Steve
I'm not sure why you're seeing a performance hit since essentially that code would modify the default style. That being said you can change the default mask used for a type using the static RegisterDefaultMaskForType method:
I figured out by using XamNumericEditor.But this leads to performance issues, it is slower than default setting.Thank!Steve
Vlad,
It does not work. I guess the dataGrid does not know it is a currency field.
How to set it for all numeric fields?
Thanks!
Steve
In this case you need to create a default style for XamCurrencyEditor without specify x:key of the Style. This way you will provide a default style for all the XamCurrency editors in the grid.
This is an example how can you do this in Xaml :
<igDP:XamDataGrid.Resources> <Style TargetType="{x:Type igEditors:XamCurrencyEditor}"> <Setter Property="Mask" Value="{}{currency:10.2:c}" /> </Style></igDP:XamDataGrid.Resources>
Of course you can set the style in Code behind as well.