PDA

View Full Version : Problem displaying the Currency Symbol from Locale



bevara.siva
7 Nov 2014, 1:15 AM
Hi,

We are using ExtJs 4.

We wanted to use the Locale setting to format the values.
For using the "ext-lang-en.js", I have added this to the index file.
In this I wanted to format the number in the Grid.
I believe this is using the following code from the ext-lang-en.js file.



Ext.define("Ext.locale.en.grid.NumberColumn", {
override: "Ext.grid.NumberColumn",
format: '0,000.00',
currencySign: '$'
});


In the above to display the currency sign before the number I have added currencySign: '$'
But this is not displaying the currency symbol there.

Please help.


Regards,
SivaPrasad.B

slemmon
10 Nov 2014, 3:13 PM
Hi,

The number column doesn't have a currencySign config that you can override in the locale override class. Try adding the following to your numberColumn config in your app:



renderer: Ext.util.Format.usMoney


See the example at the top of the API docs for numbercolumn:
http://docs.sencha.com/extjs/4.2.3/#!/api/Ext.grid.column.Number