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
300
Currency field changes format after editing
posted

Hi

We have a problem with your WebDataGrid whereby negative values in currency fields are being displayed in a different format after the value is edited.

If you edit the amount column and enter a -ve value, after leaving the cell it reverts to formatting that figure as ($1000) instead of -$1000 which it was before editing and which has been applied to the CultureInfo.  As you can see I have played around with the CultureInfo, overriding the currency symbol to "x" just to see if it was actually using the CultureInfo at any stage.

Error

 

Attached is a sample solution which replicates the issue.  I've tried a few things I found on these forums, such as setting the CultureInfo.NumberFormat.CurrencyNegativePattern but this did not help.  Note that this project will give you an error if you actually leave the row you editing because I haven't bother implementing it properly.  It doesn't matter for the purpose of showing the problem - just click into the first cell to end editing the 2nd cell.

We recently upgraded to the latest version, not sure if this is a problem in earlier versions as well.  This error happens in IE and Firefox browsers.

Can you please let us know how to stop this from happening? 

Thanks,

Marcus

WebApplication6.zip
Parents
  • 8607
    Verified Answer
    Offline posted

    Hello Marcus,

    I wasn't able to open your project, but the scenario reminded me of this.

    Could you try setting EnableScriptGlobalization and EnableScriptLocalization on the ScriptManager, as Alex suggests?

    Let me know if this helps.


    Elizabeth Albert
    Localization Engineer 

Reply Children
No Data