EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: finzaiko on September 26, 2013, 07:17:22 PM



Title: Datagrid number format
Post by: finzaiko on September 26, 2013, 07:17:22 PM
Can anyone know how to convert number format
eg: 12345678 -> 12,345,678.00

I try this plugin http://josscrowcroft.github.io/accounting.js/#demo
Code:
<th data-options="field:'total',width:50,  
      formatter:function(value, row){
      //row.total
      accounting.formatMoney(row.total);
}">Total</th>

but not work, could anyone guide me to solve this?

Thanks very much in advance.


Title: Re: Datagrid number format
Post by: stworthy on September 28, 2013, 06:15:16 AM
Try this.
Code:
<th data-options="field:'total',width:50,  
      formatter:function(value, row){
      //row.total
      return accounting.formatMoney(row.total);
}">Total</th>