EasyUI Forum
June 27, 2024, 04:39:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Seprate each 3 numbers with comma in easyui-datagrid  (Read 6959 times)
alisanie
Newbie
*
Posts: 7


View Profile
« on: December 01, 2014, 06:49:20 AM »

Hi
I have a easyui-datagrid and in one column I want to seprate each 3 numbers with comma!
Any Idea
Cheers
« Last Edit: December 01, 2014, 07:01:29 AM by alisanie » Logged
alisanie
Newbie
*
Posts: 7


View Profile
« Reply #1 on: December 01, 2014, 04:51:47 PM »

Code:
 function formatPrice(val,row){
       
return val.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
       
        }
Thats it Cheesy
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!