2

I have the need for a field which displays a currency. I chooses numberfield because it already does all necessary number-checkups. I modified the getter and setter so that the currency symbol is only visible within the field but never submitted or returned. All works pretty good but the numberfield cuts the trailing zeros from the field (yes, I configured it with a decimal precision of 2).

So my again my Question:

How can I prevent the drop of the trailing 0 (zero) by the numberfield?

JJR
  • 773
  • 2
  • 13
  • 32
  • what decimal separator at you use for ? Defaults to: '.' – mfruizs Jul 08 '13 at 11:17
  • 1
    Perhaps this is what you are looking for: http://stackoverflow.com/a/13736243 – kevhender Jul 08 '13 at 11:55
  • @mfruizs2 I use ',' defined within the config – JJR Jul 08 '13 at 13:24
  • @kevhender No, this question is about ExtJS 3 so `forcePrecision` is no longer a valid porperty. At least it is not documented – JJR Jul 08 '13 at 13:26
  • 1
    @JJR, look further up in that post then. The original post was for ExtJS 3 and may still be of use. `forcePrecision` is not a framework property, it is part of an extension that you can make yourself. – kevhender Jul 08 '13 at 13:40
  • @kevhender Yes, I figured it out and it work! Thank you for your help! – JJR Jul 08 '13 at 20:57
  • there is a post related to this. [Please follow this][1]. [1]: http://stackoverflow.com/questions/1287584/how-do-i-force-the-display-of-a-decimal-in-an-extjs-numberfield-to-a-certain-pre – Sridhar Boganathan Jul 26 '13 at 11:15

0 Answers0