Jqgrid货币格式

时间:2011-05-13 14:33:06

标签: jquery jqgrid format currency

我有一个jqgrid,它的选项:formatter => "currency"

它将5转换为$5.00,但这是一个赠送金额,因此我需要将其显示为($5.00)而不是$5.00

任何建议我应该在:formatter => "currency"中更改哪些内容?

1 个答案:

答案 0 :(得分:23)

您应该检查the currency formatter的选项。您可以定义prefixsuffix。例如,您可以使用以下选项

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

The demo在“总计”列中显示您需要的表单中的数字。

enter image description here