Search code examples
jqgrid-formatter

jqgrid currency formatter returns NaN


I want to format the amount using the jqGrid. When i use the below code,the column displays 'NaN' instead of currency value.

I want to display $1,000.00 or $10,000.00 in this format using jqGird

How can i achieve this ?

{
              name: 'amount',
              index: 'amount',
              align: 'left',
              formatter:'currency', formatoptions:{decimalSeparator:",", thousandsSeparator: ",", decimalPlaces: 2, prefix: "$ "}
        },

Any suggestions ?


Solution

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