Forum



17:49

28/03/2010

I am having some problems sorting formatted data.
I have a column with the underlying values -1,0,1, but I want to display as '-', ' ', '+'. I also need these to sort as they would using the underlying integer values. I am using local data and the TableToGrid plugin.
I tried using creating the table using -1,0,1, and using a custom formatter. This displayed the values correctly, but I couldn't make it sort on the underlying integer data, only as text using the +,- symbols, so the sort order is displayed wrongly.
Problem 1: I think this is a bug and sorting should be done before formatting is applied
To find a workaround I saw in /jqgridwiki/doku.php?id=wiki:colmodel_options that there is a custom sorttype option. However I cannot find any documentation for how to use it, either in the examples or the documentation.
Problem 2: can someone show me how to use a custom function for sorttype instead of sorttype: int, float etc.
Thanks,
Most Users Ever Online: 715
Currently Online:
64 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