Gan
Gan

Reputation: 644

How to render number as us currency without any decimal point in Ext JS 4.1

I am using following code to render number as currency

UtilFormat.currency(v, '$', 0);

I don't want any decimal point in output for example input (1279039) then output should be $1,279,039 but i am getting $1,279,039.00

Thanks.

Upvotes: 0

Views: 3897

Answers (2)

kalyani
kalyani

Reputation: 1

Try the below code

var val = Ext.util.Format.number(value , '0,000') 
return '$' + val;

Upvotes: 0

Aniketos
Aniketos

Reputation: 659

There is no global object UtilFormat in ExtJS 4.1. Try

Ext.util.Format.currency(1279039, '$', 0);

Upvotes: 2

Related Questions