Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I format the numbers in viewrecord on jqgrid pager?

When a large number of pages are present, the format of the numbers in the pager is "11 223" but I would like it to be "11,223"

View 11 026 - 11 031 of 11 031

should be

View 11,026 - 11,031 of 11,031

I searched the documentation for JQGrid but couldn't find a way to do this.

like image 687
bigrockshow Avatar asked Sep 15 '10 15:09

bigrockshow


1 Answers

You can set

$.jgrid.formatter.integer.thousandsSeparator=',';

or modify in the grid.locale-en.js file (or another locale file which you use) the line 90

integer : {thousandsSeparator: " ", defaultValue: '0'},

(in the minimized version you should search for integer:{thousandsSeparator:" ") to the line

integer : {thousandsSeparator: ",", defaultValue: '0'},

By the way, you can of cause set also $.jgrid.formatter.integer.thousandsSeparator='', then it will be no thousand separator: instead of "11 223" you will have "11223" and not "11,223".

like image 115
Oleg Avatar answered Dec 31 '22 20:12

Oleg