Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
sorttype: custom functions
17/07/2010
17:49
Avatar
cjm19682
Member
Members
Forum Posts: 9
Member Since:
28/03/2010
sp_UserOfflineSmall Offline

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,

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information