<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: sorttype: custom functions</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/sorttype-custom-functions</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/help/sorttype-custom-functions/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>cjm19682 on sorttype: custom functions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/sorttype-custom-functions#p18649</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/sorttype-custom-functions#p18649</guid>
        	        	<description><![CDATA[<p>I am having some problems sorting formatted data.</p>
</p>
<p>I have a column with the underlying values -1,0,1, but I want to display as &#39;-&#39;, &#39; &#39;, &#39;+&#39;. I also need these to sort as they would using the underlying integer values. I am using local data and the TableToGrid plugin.</p>
</p>
<p>I tried using creating the table using -1,0,1, and using a custom formatter. This displayed the values correctly, but I couldn&#39;t make it sort on the underlying integer data, only as text using the +,- symbols, so the sort order is displayed wrongly.<br /><strong>Problem 1</strong>: I think this is a bug and sorting should be done before formatting is applied</p>
</p>
<p>To find a workaround I saw in /jqgridwiki/doku.php?id=wiki:colmodel_options&#160;that&#160;there is a custom sorttype option. However I cannot find any documentation for how to use it, either in the examples or the documentation.<br /><strong>Problem 2</strong>: can someone show me how to use a custom function for sorttype instead of sorttype: int, float etc.</p>
</p>
<p>Thanks,</p></p>
]]></description>
        	        	<pubDate>Sat, 17 Jul 2010 17:49:00 +0300</pubDate>
        </item>
</channel>
</rss>