Forum
Topic RSS
06:42
Hello!
I am using grid.locale-de.js - if i set a dot as thousandsSeparator:
formatter:{integer:{thousandsSeparator:".",defaultValue:"0"}
The Numbers are sorted in false order e.g. 0,1021,213 indstead of 0,213,1021
If i use an other thousandsSeparator like space " " the numbers are sorted correct.
Can anybody help me
Juergen
05:11
Moderators
30/10/2007
OfflineHello,
Do you have set in colModel the property sorttype of that column, this is needed when we use local data
http://www.trirand.com/jqgridw.....array_data
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
09:52
Hello Tony,
the sorttype in colModel is set to "int":
jQuery(document).ready(function(){
tableToGrid('#irgendwas',
{ height:370,
colNames:['Artikelnummer','Bezeichnung1', 'Bezeichnung2', 'Bezeichnung3','Bestand','Abfragedatum'],
colModel:[
{name:'Artikelnummer',index:'1', width:"115", sorttype:"int",align:'right'},
{name:'Bezeichnung1',index:'2'},
{name:'Bezeichnung2',index:'3'},
{name:'Bezeichnung3',index:'4'},
{name:'Bestand',index:'5', sorttype:'int', width:"90", formatter:'integer',align:'right'},
{name:'Abfragedatum',index:'6', sorttype:"date"}],
autowidth:true});
Regards
Juergen
10:59
30/07/2009
OfflineThe problem is in $.unformat:
stripTag = eval("/"+op.thousandsSeparator+"/g");
ret = $(cellval).text().replace(stripTag,'');
If op.thousandsSeparator is ".", that replaces the entire text with '' (the pattern becomes /./g which matches everything).
Looks like something along the lines of:
var sep = op.thousandsSeparator.replace(/([\\.\\*\\(\\)\\{\\}\\+\\?\\\\])/g,"\\\\$1");
stripTag = new RegExp(sep, "g");
should do the trick. I think that covers all the special chars. An alternative would be:
sep = op.thousandsSeparator.replace(/([^\\w\\s])/g,"\\\\$1");
That should guarantee to hit all the chars that need quoting - but also hits a few that dont.
08:32
Moderators
30/10/2007
OfflineHello,
Thanks. Already fixed in in 3.5.3 Release.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
22 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home
