Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
ig grid template breaks when using currency formatter
posted

Hello 

I am trying to format a cell in iggrid. The cell value is of a double value and is formatted with (format: 'currency').

Here is what I see:

- When Amt is < 0 and 

- When using this in grid { headerText: 'Amount' , key: 'Amt', dataType: 'number' , template: '{{if ${Amt} < 0}} print this {{else}} print that {{/if}}'},  format: 'currency' },

'print that' gets printed. 

- When using this in grid { headerText: 'Amount' , key: 'Amt', dataType: 'number' , template: '{{if ${Amt} < 0}} print this {{else}} print that {{/if}}'} }, // (note the removal of "format: 'currency'")

'print this' gets printed. 

I am assuming that when the template trying to resolve this it takes the 'formatted' value (in this case with $ sign and () if negative) and try to resolve it but it returns always false. Is there a way to fix this.
Thanks
Herald
Parents Reply Children