<?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: Issue Sorting Json in jqGrid 3.6.1</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1</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/issue-sorting-json-in-jqgrid-3-6-1/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19671</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19671</guid>
        	        	<description><![CDATA[<p>If you will use integer data for &#39;ID&#39; column and replace name:ID&#39; to name:&#39;ID&#39; in the last version of the JavaScript code which you posted, the grid will be filled with data: <a href="http://www.ok-soft-gmbh.com/jqGrid/StudentGridData.htm" rel="nofollow" target="_blank"><a href="http://www.ok-soft-gmbh.com/jq" rel="nofollow">http://www.ok-soft-gmbh.com/jq</a>.....idData.htm</a> (also with empty data and "KG" as integer).</p>
<p>Regards<br /><span style="font-size: 14.1667px;">Oleg</span></p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 20:35:14 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19662</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19662</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>The first row which you has in your "JSON" data has the value "KG" as integer GradeLevel and "" as a date in format &#39;d/m/Y&#39;. I understand that jqGrid has a problem to read the data.</p>
<p>Best regards<br />Oleg&#160;</p>
</blockquote>
<hr />
<p>I could replace the "KG" with "0" and use a formatter to address that issue.&#160; What do you reccomend in cases where the data contains an empty date to avoid confusing jqGrid?</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 17:10:26 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19661</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19661</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>The data which you pasted can not be verified in <a rel="nofollow" href="http://www.jsonlint.com&#160;because&#160;of" target="_blank"></a><a href="http://www.jsonlint.com&#160;b" rel="nofollow" target="_blank">http://www.jsonlint.com&#160;b</a>.....se&#160;of lines like</p>
<p>"u003ca href="<a href="file:///Home/SelectTest?studentId=123456&#38;gradeLevel=KG" target="_blank">HomeSelectTest?studentId=123456&#38;gradeLevel=KG</a>&#160;&#160;&#160;&#160;&#160; "u003e123456u003c/au003e",</p>
<p>Whit values was before you paste in in the forum I can only guess, but it is far from an integer value how you declare in the ID column.</p>
</blockquote>
<hr />
<p>Looks like the original developer was passing HTML within the JSON to make the ID&#39;s linkable.&#160; I&#39;m working on refactoring this so formatter:&#39;showlink&#39; is used instead.</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 17:08:41 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19660</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19660</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>Your JSON data has "i" instead of "id" (for example "i": 123456).</p>
</blockquote>
<hr />
<p>I&#39;ve corrected this in&#160;the code, it&#160;is now&#160;"id".</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 17:06:56 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19657</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19657</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>Which id has you table element of the jqGrid: "list" or "gridid"? In your code you use both.</p>
<hr />
</blockquote>
<p>The table element id is "list".&#160; I accidentally pasted "gridid" from some sample code but I changed this to "list" in my code.&#160; It didn&#39;t seem to have the desired effect so I removed those lines.</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 15:36:41 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19639</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19639</guid>
        	        	<description><![CDATA[<p>Which id has you table element of the jqGrid: "list" or "gridid"? In your code you use both.</p>
<p>Your JSON data has "i" instead of "id" (for example "i": 123456).</p>
<p>The data which you pasted can not be verified in <a href="http://www.jsonlint.com&#160;because&#160;of" rel="nofollow" target="_blank"><a href="http://www.jsonlint.com&#160;b" rel="nofollow">http://www.jsonlint.com&#160;b</a>.....se&#160;of</a> lines like</p>
<p>"u003ca href="<a href="file:///Home/SelectTest?studentId=123456&#38;gradeLevel=KG" target="_blank">HomeSelectTest?studentId=123456&#38;gradeLevel=KG</a>&#160;&#160;&#160;&#160;&#160; "u003e123456u003c/au003e",</p>
<p>Whit values was before you paste in in the forum I can only guess, but it is far from an integer value how you declare in the ID column.</p>
<p>The first row which you has in your "JSON" data has the value "KG" as integer GradeLevel and "" as a date in format &#39;d/m/Y&#39;. I understand that jqGrid has a problem to read the data.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Fri, 10 Sep 2010 00:26:41 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19638</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19638</guid>
        	        	<description><![CDATA[<p>After digging into the server-side code more today, it seems that the sorting symptioms described above may be caused by a server side sort coupled with a client side sort.&#160; I became suspicious when I was able to successfully change the "KG" values in my data to zeros both on the server and client side, but even this had no effect on the search.</p>
<p>I&#39;m hoping that jqGrid can handle paging of 1,000 records or so client side.&#160; I think I read something about maybe 100,000 records being it&#39;s limit in another thread?</p>
]]></description>
        	        	<pubDate>Thu, 09 Sep 2010 23:36:10 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19632</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19632</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>To be able to help you you should post the JSON data which makes the problem: 2-3 line of data wold be OK (if you want test local paging you can send 6 rows and set rowNum: 5).</p>
</blockquote>
<hr />
<p>The data returned validatates as "Valid JSON" in JSONLint.&#160; Here is a sample with 3&#160;rows of data:</p>
<blockquote>
<p>{<br />&#160;&#160;&#160; "total": 33,<br />&#160;&#160;&#160; "page": 1,<br />&#160;&#160;&#160; "records": 805,<br />&#160;&#160;&#160; "rows": [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "i": 123456,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "cell": [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "\u003ca href="<a href="file://\\Home\\SelectTest?studentId=123456&#38;gradeLevel=KG" target="_blank">\\Home\\SelectTest?studentId=123456&#38;gradeLevel=KG</a>&#160;&#160;&#160;&#160;&#160; "\u003e123456\u003c/a\u003e",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "Thomas",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "Jefferson",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "PENDING ",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "KG",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ""<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "i": 234567,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "cell": [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "\u003ca href="<a href="file://\\Home\\SelectTest?studentId=234567&#38;gradeLevel=9" target="_blank">\\Home\\SelectTest?studentId=234567&#38;gradeLevel=9</a>&#160;&#160;&#160;&#160;&#160;&#160; "\u003e234567\u003c/a\u003e",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "Benjamin",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "Franklin",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "ENROLLED",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "1",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "02/25/2010"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "i": 345678,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "cell": [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "\u003ca href="<a href="file://\\Home\\SelectTest?studentId=345678&#38;gradeLevel=11" target="_blank">\\Home\\SelectTest?studentId=345678&#38;gradeLevel=11</a>&#160;&#160;&#160;&#160;&#160; "\u003e345678\u003c/a\u003e",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "George",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "Washington",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "ENROLLED",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "11",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "04/01/2010"<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ]<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; ]<br />}</p>
</blockquote>
<p>The JSON is generated as a System.Web.Mvc.JsonResult object as part of a .NET MVC project so it seems that the formatting is valid.</p>
<p>The main issue I&#39;m trying to resolve is to ensure that the grade level fields sort as integers instead of text&#160;(values KG, 1, and 11) in the data above.&#160; I have another jqGrid with values ranging from KG to 2 and it seems to be sorting properly in local mode.</p>
<p>As a secondary issue I&#39;d like the date to sort properly as well.&#160; It&#39;s also sorting as text at the moment.</p>
]]></description>
        	        	<pubDate>Thu, 09 Sep 2010 17:47:36 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19613</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19613</guid>
        	        	<description><![CDATA[<p>To be able to help you you should post the JSON data which makes the problem: 2-3 line of data wold be OK (if you want test local paging you can send 6 rows and set rowNum: 5).</p>
<p>One typical problem could be that you used&#160;character&#160;&#39; instead of " in your "JSON" data or used unquoated properties names. The JSON formant is described under <a href="http://www.json.org" rel="nofollow" target="_blank">http://www.json.org</a>. You can very easy test your data on <a href="http://www.jsonlint.com" rel="nofollow" target="_blank">http://www.jsonlint.com</a>. New version of jqGrid and jQuery use internal JSON parser of the web browser which allow only correct JSON data.</p>
<p>If you don&#39;t find the error in your application now and not goes now to the jqGrid 3.7.2 you will be do the same work later. So I continue recommend you invest your time in upgrading now to stay to together with the time. After you will have success you will be really happy.</p>
<p>Best regards<br />Oleg&#160;</p>
]]></description>
        	        	<pubDate>Thu, 09 Sep 2010 00:31:02 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19611</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19611</guid>
        	        	<description><![CDATA[<blockquote>
<p>OlegK said:</p>
<p>I recommend you to use jqGrid 3.7.2 or jqGrid 3.8 beta from <a rel="nofollow" href="http://github.com/tonytomov/jqGrid/tree/dev" target="_blank"></a><a href="http://github.com/tonytomov/jq" rel="nofollow" target="_blank">http://github.com/tonytomov/jq</a>.....d/tree/dev. Nobody (probably only Tony) have the version or will be test the retro version specially for you.</p>
<hr />
</blockquote>
<p>Understood, I updated the code&#160;to jqGrid 3.7.2</p>
<p>I tried the loadonce: true setting you mentioned and it seemed to break, displaying only one record (I&#39;m not sure where it&#39;s from yet).</p>
<p>As for the other issues I described above, the upgrade alone&#160;didn&#39;t resolve&#160;them.</p>
<p>I have misgivings at returning all rows because this could amount to tens of thousands of results.</p>
]]></description>
        	        	<pubDate>Wed, 08 Sep 2010 22:49:23 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19575</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19575</guid>
        	        	<description><![CDATA[<p>I recommend you to use jqGrid 3.7.2 or jqGrid 3.8 beta from <a href="http://github.com/tonytomov/jqGrid/tree/dev" rel="nofollow" target="_blank"><a href="http://github.com/tonytomov/jq" rel="nofollow">http://github.com/tonytomov/jq</a>.....d/tree/dev</a>. Nobody (probably only Tony) have the version or will be test the retro version specially for you.</p>
<p>In the current version there there are nice parameter <a href="/jqgridwiki/doku.php?id=wiki:options" target="_blank">loadonce:true</a>. It switch datatype: &#39;json&#39; to datatype: &#39;local&#39; for you. Moreover in the current version there are full local sorting, paging and searching support. So your server can just send back the whole data.</p>
<p>Moreover local sorting and server side paging is not logical, because sorting are means through all data and not inside a page only. If you already implemented server side paging, that server side sorting will be only some lines of cod (probably only one line).</p>
<p>If you will have problem with the usage of last version or find a bug you will be quickly receive help from developers and from&#160;community. Why you should invest your time in tricks with the very old version? A lot of problems and improvement are alredy exist in the new version.</p>
<p>Best regards<br /><span style="font-size: 13.8889px;">Oleg</span></p>
]]></description>
        	        	<pubDate>Tue, 07 Sep 2010 23:11:17 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19574</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19574</guid>
        	        	<description><![CDATA[<p>I&#39;ve updated the code as follows but I&#39;m still having trouble with the&#160;&#39;GradeLevel&#39; field&#160;sort. It&#39;s still sorting like text even though I set it to sort as int.</p>
<blockquote>
<p>jQuery("#list").jqGrid({<br />&#160;&#160;&#160;&#160;url: &#39;/Home/StudentGridData/&#39;,<br />&#160;&#160;&#160;&#160;datatype: &#39;json&#39;,<br />&#160;&#160;&#160;&#160;loadComplete: function () {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#gridid").jqGrid(&#39;setGridParam&#39;, { datatype: &#39;local&#39; });<br />&#160;&#160;&#160;&#160;},<br />&#160;&#160;&#160;&#160;onPaging: function (which_button) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery("#gridid").jqGrid(&#39;setGridParam&#39;, { datatype: &#39;json&#39; });<br />&#160;&#160;&#160;&#160;},<br />&#160;&#160;&#160;&#160;mtype: &#39;POST&#39;,<br />&#160;&#160;&#160;&#160;colNames: [&#39;ID&#39;,&#39;First Name&#39;,&#39;Last Name&#39;, &#39;Status&#39;,&#39;Grade Level&#39;,&#39;Enroll Date&#39;],<br />&#160;&#160;&#160;&#160;colModel: [<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:ID&#39;,index:&#39;ID&#39;,width:60,align:&#39;left&#39;,sorttype:&#39;int&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:&#39;FirstName&#39;,index:&#39;FirstName&#39;,width:150,sorttype:&#39;text&#39;,align:&#39;left&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:&#39;LastName&#39;,index:&#39;LastName&#39;,width:150,sorttype:&#39;text&#39;,align:&#39;left&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:&#39;Status&#39;,index:&#39;Status&#39;,width:200,sorttype:&#39;text&#39;,align:&#39;left&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:&#39;GradeLevel&#39;,index:&#39;GradeLevel&#39;,width:100,sorttype:&#39;int&#39;,align:&#39;left&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { name:&#39;EnrollmentDate&#39;,index:&#39;EnrollmentDate&#39;,width:150,sorttype:&#39;date&#39;,datefmt:&#39;d/m/Y&#39;,align:&#39;left&#39;}],<br />&#160;&#160;&#160;&#160;rowNum: 25,<br />&#160;&#160;&#160;&#160;rowList: [5, 10, 20, 50],<br />&#160;&#160;&#160;&#160;height: &#39;auto&#39;,<br />&#160;&#160;&#160;&#160;pager: jQuery(&#39;#pager&#39;),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; sortname: &#39;ID&#39;,<br />&#160;&#160;&#160;&#160;viewrecords: true,<br />&#160;&#160;&#160;&#160;sortorder: "desc",<br />&#160;&#160;&#160;&#160;caption: &#39;Student&#39;,<br />&#160;&#160;&#160;&#160;width: &#39;70%&#39;,<br />&#160;&#160;&#160;&#160;postData: {&#39;ID&#39;:" ",&#39;firstName&#39;:"ALL", &#39;lastName&#39;:"ALL"}</p>
<p>&#160;&#160;&#160;} );</p>
</blockquote>
]]></description>
        	        	<pubDate>Tue, 07 Sep 2010 22:28:51 +0300</pubDate>
        </item>
        <item>
        	<title>Neb Okla on Issue Sorting Json in jqGrid 3.6.1</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19523</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/issue-sorting-json-in-jqgrid-3-6-1#p19523</guid>
        	        	<description><![CDATA[<p>I&#39;ve been given a task to fix a broken sort for primary school grade levels in the US.</p>
</p>
<p>Students begin school in Kindergarten (represented in the&#160;grid as KG), then advance to 1st, 2nd, 3rd grades etc. until they reach 11th and 12th grades.</p>
</p>
<p>Presently, sorting on the&#160;"Grade Level"&#160;column&#160;results in a sort order like this:</p>
<p style="PADDING-LEFT: 30px">1</p>
<p style="PADDING-LEFT: 30px">11</p>
<p style="PADDING-LEFT: 30px">12</p>
<p style="PADDING-LEFT: 30px">9</p>
<p style="PADDING-LEFT: 30px">KG</p>
</p>
<p>It should be sorted as follows:</p>
<p style="PADDING-LEFT: 30px">KG</p>
<p style="PADDING-LEFT: 30px">1</p>
<p style="PADDING-LEFT: 30px">9</p>
<p style="PADDING-LEFT: 30px">11</p>
<p style="PADDING-LEFT: 30px">12</p>
</p>
<p>I&#39;ve implemented&#160;similar grids elsewhere with a datatype of &#39;local&#39;.&#160; Setting a sorttype of&#160;&#39;int&#39; seems to be working there with regard to&#160;KG, 1st, and 2nd grades&#160;(though I still need to test with grades 11 and 12).</p>
<p>It seemed obvious to set sorttype to &#39;int&#39; to try to fix this issue, but it seems to have no effect (though I have verified that the sorttype is specified appropriately in the colModel.</p>
<p>I intend to explore this in more detail but I figured that getting the idea out there over our long holiday weekend might generate some ideas to point me in the right direction when I return to this issue on Tuesday.</p>
<p>The datatype of the code I&#39;m attempting to fix&#160;is &#39;json&#39;.&#160; I&#39;ll include a sample below:</p>
<blockquote>
<p>jQuery("#list").jqGrid({</p>
<p>url: &#39;/Home/StudentGridData/&#39;,</p>
<p>datatype: &#39;json&#39;,</p>
<p>mtype: &#39;POST&#39;,</p>
<p>colNames: [&#39;ID&#39;,&#39;First Name&#39;,&#39;Last Name&#39;, &#39;Status&#39;,&#39;Grade Level&#39;, &#39;Enroll Date&#39;],</p>
<p>colModel: [</p>
<p>{ name: &#39;ID&#39;, index: &#39;ID&#39;, width: 60, align: &#39;left&#39; },</p>
<p>{ name: &#39;FirstName&#39;, index: &#39;FirstName&#39;, width: 150, align: &#39;left&#39;},</p>
<p>{ name: &#39;LastName&#39;, index: &#39;LastName&#39;, width: 150, align: &#39;left&#39;},</p>
<p>{ name: &#39;Status&#39;, index: &#39;Status&#39;, width: 200, align: &#39;left&#39;},</p>
<p>{ name: &#39;GradeLevel&#39;, index: &#39;GradeLevel&#39;, width: 100, align: &#39;left&#39;, sorttype: &#39;int&#39;},</p>
<p>{ name: &#39;EnrollDate&#39;, index: &#39;EnrollDate&#39;, width: 150, align: &#39;left&#39;}],</p>
<p>pager: jQuery(&#39;#pager&#39;),</p>
<p>rowNum: 25,</p>
<p>rowList: [5, 10, 20, 50],</p>
<p>sortname: &#39;ID&#39;,</p>
<p>sortorder: "desc",</p>
<p>viewrecords: true,</p>
<p>width:&#39;70%&#39;,</p>
<p>caption: &#39;Student&#39;,</p>
<p>postData: {&#39;ID&#39;:" ",&#39;firstName&#39;:"ALL", &#39;lastName&#39;:"ALL"}</p>
</p>
<p>} );</p>
</blockquote>
<p>When I discover a solution I&#39;ll post it here.</p>
]]></description>
        	        	<pubDate>Fri, 03 Sep 2010 23:17:55 +0300</pubDate>
        </item>
</channel>
</rss>