PDA

View Full Version : Rendering the NumberField content



Tremal
5 Aug 2013, 7:53 AM
Hi,

I've been mulling over for a while this problem but do not find a correct answer.

I has write the NumberField and now I need that the value will be render to a german format. For example: 1000.23 --> 1,000.23

I'm not understanding the process to apply render. Some clue? Thanks!

slemmon
7 Aug 2013, 8:54 AM
The NumberField doesn't have a renderer method like grid cells do. But, it does have something you may look into overriding the getValue and setValue methods to inject / strip the ',' separator. You'll also need to modify the initEvents method as it sets up the stripCharsRe regular expression that only allows 0-9 (and '.' if allowDecimals is true).