XamDataGrid displays a £ sign in front of the decimal values
<DataPresenter:FieldLayout.Fields> <DataPresenter:Field Name="Value" Label="Value"> <DataPresenter:Field.Settings> <DataPresenter:FieldSettings EditAsType="{x:Type System:Int32}" /> </DataPresenter:Field.Settings> </DataPresenter:Field> </DataPresenter:FieldLayout.Fields>
this is a workaround but if I change "{x:Type System:Int32}" back to "{x:Type System:Decimal}" the £ comes back???
thanks
Why are all the links broken? Do you have a valid link?
You can try this one.
These links are all broken again, do you have a solution to this available?
Hello,
I apologize for the links. I have been looking through the discussion and I suggest you use this code in order to change the editor type:
<igDP:Field Name="Value"> <igDP:Field.Settings> <igDP:FieldSettings EditorType="{x:Type igEditors:XamNumericEditor}"/> </igDP:Field.Settings> </igDP:Field>
As Alex said the default editor for Decimal values is XamCurrencyEditor, but you can always change it using the code above and the currency symbol will disappear.
Stefan,
is this still valid for newer version of the grid? I have a decimal field in my grid and I still get currency sign even if I set EditorType to XamNumericEditor. I'm on 13.1 version.
I've also attached sample project to this post.
Hello Anton,
You can set the FieldSetting' EditAsType Proeprty to Double like this:
EditAsType="{x:Type sys:Double}"
In order to remove the currency symbol. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
You can set the editor's Mask and Format in order to achieve the functionality you want. Here you can see the available masks:
http://help.infragistics.com/Help/Doc/WPF/2012.1/CLR4.0/html/xamInputs_Masks.html
There is a double Mask, which sets how many digits you have before and after the floating point.
It works, thank you. Another quick question: it seems like by default editor has 2 decimal places. To display more do I need to create an editor style and set it in FieldSettings? If you can point to the example that would be great!