EasyUI Forum
April 29, 2024, 04:55:24 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Datagrid number format  (Read 16211 times)
finzaiko
Newbie
*
Posts: 44


View Profile
« 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.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 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>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!