我有一个jqgrid,它的选项:formatter => "currency"
它将5
转换为$5.00
,但这是一个赠送金额,因此我需要将其显示为($5.00)
而不是$5.00
。
任何建议我应该在:formatter => "currency"
中更改哪些内容?
答案 0 :(得分:23)
您应该检查the currency formatter的选项。您可以定义prefix
和suffix
。例如,您可以使用以下选项
formatter:'currency',
formatoptions: {prefix:'($', suffix:')', thousandsSeparator:','}
The demo在“总计”列中显示您需要的表单中的数字。