Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jqgrid currency format

I have a jqgrid, its option :formatter => "currency"

It is converting number 5 as $5.00, but this is a credit amount so I need to display it as ($5.00) instead of $5.00.

Any recommendations what should I change in :formatter => "currency"?

like image 524
Adnan Khan Avatar asked May 13 '11 14:05

Adnan Khan


1 Answers

You should examine options of the currency formatter. You can define prefix, and suffix. For example you can use the following options

formatter:'currency',
formatoptions: {prefix:'($', suffix:')', thousandsSeparator:','}

The demo shows in the 'Total' column the numbers in the form which you need.

enter image description here

like image 170
Oleg Avatar answered Oct 22 '22 04:10

Oleg