ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: noctrona on July 01, 2014, 12:39:05 pm

Title: Question about $.paramquery.formatCurrency function
Post by: noctrona on July 01, 2014, 12:39:05 pm
Hi,

I have question for this method "$.paramquery.formatCurrency()", it looks like the digital value handle by method will only left one decimal.

Is that possible to left two decimal by this function?


Thank you!
Title: Re: Question about $.paramquery.formatCurrency function
Post by: paramvir on July 02, 2014, 01:04:01 am
Currently $.paramquery.formatCurrency() adds only one decimal,

you could use this function to add 2 decimal places:

parseFloat(ui.cellData).toFixed(2)
Title: Re: Question about $.paramquery.formatCurrency function
Post by: noctrona on July 02, 2014, 07:46:46 am
Currently $.paramquery.formatCurrency() adds only one decimal,

you could use this function to add 2 decimal places:

parseFloat(ui.cellData).toFixed(2)

Hi,

Thanks for your answer. But is that possible format my cell value as currency and also have two decimal directly?
For the moment, I use the following way to achieve this effect:

Code: [Select]
return ((ui.cellData > 0) ? $.paramquery.formatCurrency(ui.cellData)+'0' : '');

Add a "0" string to the return value.
Title: Re: Question about $.paramquery.formatCurrency function
Post by: paramvir on July 02, 2014, 10:33:06 am
Noctrona

You are doing the right thing by appending 0.

More formatting options would be added to formatCurrency in next version probably 2.1.2
Title: Re: Question about $.paramquery.formatCurrency function
Post by: noctrona on July 03, 2014, 11:02:45 am
Noctrona

You are doing the right thing by appending 0.

More formatting options would be added to formatCurrency in next version probably 2.1.2


Thank you!