<?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: text sorttype enhancement</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement</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/feature-request/text-sorttype-enhancement/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>nolanlove on text sorttype enhancement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p25352</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p25352</guid>
        	        	<description><![CDATA[<p>Hi Oleg,</p>
<p>I have had some good success with using <strong>sorttype: function(cellValue, rowObject)</strong> as you describe.  The value which is returned from the function seems to be compared as a String however, and in some cases I would like it to be compared as an int, or date, or some other datatype without having to convert those to sortable String equivalents.</p>
<p>Do you have any idea how to do this, as in how to indicate in the sorttype function how the returned value should be interpreted in a sort?</p>
<p>Thanks,</p>
<p>Nolan</p>
]]></description>
        	        	<pubDate>Fri, 09 Dec 2011 01:29:54 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on text sorttype enhancement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22752</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22752</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>if you save the file which contain the JavaScript code (JS or HTM file) in UTF-8 encoding all work. You can try <a href="http://www.ok-soft-gmbh.com/jqGrid/CustomSearchAndSort.htm" target="_blank">the demo</a>&#160;which I created before for <a href="/blog/?page_id=393/help/searching-on-text-field-with-accentued-chars-on-local-datas/" target="_blank">the answer</a>. The demo do even more as you asked.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Tue, 12 Apr 2011 17:46:35 +0300</pubDate>
        </item>
        <item>
        	<title>McCulloch on text sorttype enhancement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22751</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22751</guid>
        	        	<description><![CDATA[<p>Thank you Oleg, this approach worked but the specific function did not. It probably had something to do with character encoding. Here is the function that ended up working for me, after researching UTF-8 encoding:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5461' value='Select Code' data-codeid='sfcode5461' /></p>
<div class='sfcode' id='sfcode5461'>sorttype: function(cellValue) { return removeDiacritics(cellValue); }</div>
<p><input type='button' class='sfcodeselect' name='sfselectit4352' value='Select Code' data-codeid='sfcode4352' /></p>
<div class='sfcode' id='sfcode4352'>function removeDiacritics(s)<br />{<br />&#160;&#160; &#160;var r = s.toLowerCase();<br />&#160;&#160; &#160;var diacritics = [<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00E0-\\u00E5]/gi, &#39;a&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/\\u00E6/gi, &#39;ae&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/\\u00E7/gi, &#39;c&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00E8-\\u00EB]/gi, &#39;e&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00EC-\\u00EF]/gi, &#39;i&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/\\u00F0/gi, &#39;d&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/\\u00F1/gi, &#39;n&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00F2-\\u00F6,\\u00F8]/gi, &#39;o&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00F9-\\u00FC]/gi, &#39;u&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/[\\u00FD,\\u00FF]/gi, &#39;y&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;[/\\u00DF/gi, &#39;ss&#39;]<br />&#160;&#160; &#160;];</p>
<p>&#160;&#160; &#160;for (var i = 0; i &#60; diacritics.length; i++)<br />&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;r = r.replace(diacritics[i][0], diacritics[i][1]);<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;return r;<br />}</p>
</div>
<p> Thanks for the help.  </p>
<hr />
]]></description>
        	        	<pubDate>Tue, 12 Apr 2011 16:45:36 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on text sorttype enhancement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22746</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22746</guid>
        	        	<description><![CDATA[<p>Hello McCulloch,</p>
<p>jqGrid have a nice posibility to define some properties as functions. For example the <strong>sorttype</strong> property of the <strong>colModel</strong> can be also defined as function with the prototype <strong>sorttype: function(cellValue, rowObject) {/* return some value which will be used in compare operations */}</strong>. I hope that the implementation of <strong>sorttype</strong>&#160;can solve your problem</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4140' value='Select Code' data-codeid='sfcode4140' /></p>
<div class='sfcode' id='sfcode4140'>sorttype: function(cellValue) {<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#224;&#225;&#226;&#227;&#228;&#229;]/gi,&#39;a&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#232;&#233;&#234;&#235;]/gi,&#39;e&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#236;&#237;&#238;&#239;]/gi,&#39;i&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#242;&#243;&#244;&#245;&#246;&#248;]/gi,&#39;o&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#249;&#250;&#251;&#252;]/gi,&#39;u&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/[&#253;&#255;]/gi,&#39;y&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/&#230;/gi,&#39;ae&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/&#339;/gi,&#39;oe&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/&#231;/gi,&#39;c&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/&#353;/gi,&#39;s&#39;);<br />&#160;&#160; &#160;cellValue&#160;= cellValue.replace(/&#241;/gi,&#39;n&#39;);<br />&#160;&#160; &#160;return cellValue.replace(/Å¾/gi,&#39;z&#39;);<br />}&#160;</div>
<p>Best regards<br />Oleg</p>
]]></description>
        	        	<pubDate>Tue, 12 Apr 2011 00:38:50 +0300</pubDate>
        </item>
        <item>
        	<title>McCulloch on text sorttype enhancement</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22740</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/text-sorttype-enhancement#p22740</guid>
        	        	<description><![CDATA[<p>Currently the sorttype property of a column defines the type of the column for appropriate sorting.</p>
<p>Possible values include int/integer - for sorting integer ; float/number/currency - for sorting decimal numbers ; date - for sorting date and text - for text sorting.</p>
<p>I have a need for case, punctuation and accent insensitive text sorting.</p>
<p>For example, currently jqGrid sorts a column in this order:</p>
<ol>
<li>...</li>
<li>Cross-border reorganization</li>
<li>Crystallization of...</li>
<li>Cr&#233;dit d&#39;imp&#244;t ...</li>
<li>...</li>
<li>Draft Guidance on ...</li>
<li>Dubai Investment</li>
<li>D&#233;cisions r&#233;centes</li>
<li>...</li>
<li>Lutte contre les planifications fiscale</li>
<li>L&#8217;Institut des Cadres Fiscaliste: ...</li>
<li>Majoration fiscale ...</li>
<li>...</li>
<li>World Tour ...</li>
<li>&#201;cole de hautes ...</li>
<li>...</li>
</ol>
<p>The requirement is to have a sortable column in this order:</p>
<ol>
<li>...</li>
<li>Cr&#233;dit d&#39;imp&#244;t ...</li>
<li>...</li>
<li>Cross-border reorganization</li>
<li>Crystallization of...</li>
<li>...</li>
<li>D&#233;cisions r&#233;centes</li>
<li>...</li>
<li>Draft Guidance on ...</li>
<li>Dubai Investment</li>
<li>...</li>
<li>&#201;cole de hautes ...</li>
<li>...</li>
<li>L&#8217;Institut des Cadres Fiscaliste: ...</li>
<li>...</li>
<li>Lutte contre les planifications fiscale</li>
<li>Majoration fiscale ...</li>
<li>...</li>
<li>World Tour ...</li>
<li>...</li>
</ol>
]]></description>
        	        	<pubDate>Mon, 11 Apr 2011 21:40:48 +0300</pubDate>
        </item>
</channel>
</rss>