Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
£ sign in front of the decimal values
posted

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

Parents
  • 69686
    posted
     Hello,

    This happens because the default XamEditor for a field of type Decimal in the XamDataGrid is xamCurrencyEditor and therefore it shows the currency symbol of the current culture. One way to avoid this ( if not needed ) is to register another XamEditor to the fields of type Decimal. This is done by calling the calling the static RegisterDefaultEditorForType method of the ValueEditor Class.

    Here is an article about this method -- RegisterDefaultEditorForType Method.

    Hope this helps.
Reply Children