<?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: problem with columns sorting and paging</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging</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/problem-with-columns-sorting-and-paging/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Zoze on problem with columns sorting and paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4106</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4106</guid>
        	        	<description><![CDATA[</p>
<p>Thanks Tony for your helpful comment !</p>
<p>I&#39;ll check again my server side code and try to solve this !</p>
</p>
<p>Regards,</p>
<p>Zoze</p>
]]></description>
        	        	<pubDate>Thu, 22 Jan 2009 10:54:38 +0200</pubDate>
        </item>
        <item>
        	<title>tony on problem with columns sorting and paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4101</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4101</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<ol>
<li>It is a good idea to check you server side code when you try to sort and navigate between pages. The grid accept the data what is returned from the server. If you do not return the right values when you sort then you can not expect good behavior. And this is not from jqGrid.</li>
<li>If you set rowNum to 10 then your server should return 10 rows (or less and not greater) and nothing more. If you set rownum 10 and you return 24 that is the problem of the server side code.</li>
</ol>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 22 Jan 2009 10:05:58 +0200</pubDate>
        </item>
        <item>
        	<title>Zoze on problem with columns sorting and paging</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4081</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/problem-with-columns-sorting-and-paging#p4081</guid>
        	        	<description><![CDATA[<p>Hi guys,</p>
<p>I am new at jqgrid and jquery in general. I am following the demo examples and trying to display json data in a grid. I have managed to do that, but I face two major problems.</p>
<p>(1)<br />The columns sorting doesn&#39;t seem to work. As far as I have understood reading the documentation, sortable:true is the default param, so I suppose I must not add something else to achieve sorting. The same problem appears even if I use xml datatype, but everything is ok if I use local datatype (and fill grid with static values)</p>
</p>
<p>(2)<br />The pager doesn&#39;t operate appropriately. Althought I set rowNum to 10, if the returned results are, let&#39;s say 24 (I am using a REST web service to get the json file), all the 24 rows will be displayed in one page, instead of three.</p>
<p>My json file has the following format:</p>
<p>{<br />&#160; "total": 3,<br />&#160; "page": "1",<br />&#160; "records": "24",<br />&#160; "rows": [<br />&#160;       {"id": 1,"cell": ["col1", "col2", "col3", "col4", "col5" ]}<br />}</p>
</p>
<p>and my html (taken from demos page):</p>
<p>&#60;html&#62;<br />&#160;&#60;head&#62;<br />&#160; &#60;title&#62;XML Mapping&#60;/title&#62;<br />&#160; &#60;link type="text/css" rel="stylesheet" href="themes/basic/grid.css"/&#62;<br />&#160; &#60;script type="text/javascript" src="jquery.js"&#62;&#60;/script&#62;<br />&#160; &#60;script type="text/javascript" src="jquery.jqGrid.js"&#62;&#60;/script&#62;<br />&#160;&#160;<br />&#160; &#60;script type="text/javascript"&#62;<br />&#160; jQuery(document).ready(function(){&#160;<br />&#160; jQuery("#jsonmap").jqGrid({<br />&#160; url: "/my-appl/getJsonData",<br />&#160; datatype: "json",<br />&#160; colNames: ["ASIN", "Author", "Title", "Price", "Published Date"],<br />&#160; colModel: [<br />&#160; &#160; &#160;{name: "ASIN", index: "ASIN", width: 100},<br />&#160; &#160; &#160;{name: "Author", index: "Author", width:120},<br />&#160; &#160; &#160;{name: "Title", index: "Title", width: 180},<br />&#160; &#160; &#160;{name: "Price", index: "Manufacturer", width: 100, sorttype: "float"},<br />&#160; &#160; &#160;{name: "DatePub", index: "ProductGroup", width: 130, sorttype: "date"}<br />&#160; ],<br />&#160; sortname: &#39;Price&#39;,<br />&#160; sortorder: "desc",<br />&#160; height: 250,<br />&#160; rowNum: 10,<br />&#160; rowList: [10,20,30],<br />&#160; imgpath: "themes/basic/images",<br />&#160; viewrecords: true,<br />&#160; pager: jQuery("#pjmap"),<br />&#160; jsonReader: {<br />&#160;    &#160; &#160;root: "rows",<br />&#160;    &#160; &#160;page: "page",<br />&#160;    &#160; &#160;total: "total",<br />&#160;    &#160; &#160;records: "records",<br />&#160;    &#160; &#160;repeatitems: true,<br />&#160;    &#160; &#160;cell: "cell",<br />&#160;    &#160; &#160;id: "id"&#160;<br />&#160;},<br />&#160; caption: "JSON Mapping Example"<br />&#160; });<br />&#160; });<br />&#160; &#60;/script&#62;<br />&#160;&#60;/head&#62;&#160;<br />&#160;&#60;body&#62;<br />&#160; &#60;table id="jsonmap" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62;&#160;<br />&#160; &#60;div id="pjmap" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;<br />&#160;&#60;/body&#62;<br />&#60;/html&#62;</p>
<p>Any help is more than welcome! Thank you for your time</p>
<p>Regards,</p>
<p>Zoze</p>
]]></description>
        	        	<pubDate>Thu, 22 Jan 2009 02:40:08 +0200</pubDate>
        </item>
</channel>
</rss>