Search code examples
javascriptextjsextjs3

ExtJs NumberField Using thousand seperator


there is an old project that uses ExtJs 3.0 and i need to use number field with thousand seperator and currency (USD, EUR, TL etc.). But when i sent/get it to/from server with ajax request the original value must be post/get. ExtJs 3.0 number field does not support too much options. Any help!


Solution

  • Your problem is how to show number field as currency on UI only, right? If that, try using Ext.util.Format on your renderer. Something like this below code:

    id: 'abc',
    header: 'ABC'
    renderer: function(value){
        return Ext.util.Format.usMoney(value);
    }
    

    I have not found ExtJS 3.0 Documents, but in Extjs3.4 I found that the Ext.util.Format is available from version 1.1.