Title: [SOLVED]Datagrid formatter problem Post by: Pierre on April 12, 2016, 07:41:24 AM Hello all
I have simple table column: Code: <th field="quantity" data-options="formatter:formatdecimal">Quantity</th> formatdecimal looks like this: Code: Number.prototype.format = function(n, x, s, c) { and it says "Uncaught TypeError: num.format is not a function" What is the problem? Here is original code: http://jsfiddle.net/hAfMM/612/ Is there any other option to format numbers like 123.456,78 (group separator point, decimal separator comma) Thank you Title: Re: Datagrid formatter problem Post by: stworthy on April 12, 2016, 06:06:38 PM You must convert to 'number' type before calling your 'format' function.
Code: function formatdecimal(num){ Title: Re: Datagrid formatter problem Post by: Pierre on April 12, 2016, 10:26:08 PM Awesome. Thank you.
|