<?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: jqGrid / JSON data - Problems with pagination and sorting.</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting</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/discussion/jqgrid-json-data-problems-with-pagination-and-sorting/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>varaprasadd on jqGrid / JSON data - Problems with pagination and sorting.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26955</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26955</guid>
        	        	<description><![CDATA[<p>Hi All,</p>
<p><span style="white-space: pre;"> </span>I need complete code for Jqgrid &#160;with struts 1.x.. Some one help me plzzzzzzzz</p>
]]></description>
        	        	<pubDate>Tue, 17 Jul 2012 08:37:24 +0300</pubDate>
        </item>
        <item>
        	<title>Arvind Yadav on jqGrid / JSON data - Problems with pagination and sorting.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26679</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26679</guid>
        	        	<description><![CDATA[<p>Right... addRowData is too bad for the performance, even the IE browser throws script error to load just 400-500 records. But changing the datatype to local increase the performance and help in loading large no. of records.</p>
]]></description>
        	        	<pubDate>Fri, 25 May 2012 22:28:08 +0300</pubDate>
        </item>
        <item>
        	<title>tony on jqGrid / JSON data - Problems with pagination and sorting.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26277</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26277</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>It is better not to use addRowData, but use a data parameter in the grid. Look into the docs.</p>
<p>Do not use datatype as function, but in data parameter you can use the function and return the object.</p>
<p>In this case you will need to set datatype = local</p>
</p>
<p>Regards</p></p>
]]></description>
        	        	<pubDate>Mon, 02 Apr 2012 17:49:16 +0300</pubDate>
        </item>
        <item>
        	<title>dav_rms on jqGrid / JSON data - Problems with pagination and sorting.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26270</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/jqgrid-json-data-problems-with-pagination-and-sorting#p26270</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>I&#39;m trying to read a JSON file to populate a jqGrid through jQuery. Grid loads fine. But, I couldn&#39;t able to acheive pagination and sorting.</p>
</p>
<p>Can someone help?. Here is my code.</p>
<p>==========================================================================</p>
<p>Grid.html</p>
<p>==========================================================================</p>
</p>
<p>&#60;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&#62;<br />&#60;html xmlns="http://www.w3.org/1999/xhtml"&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;link rel="stylesheet" type="text/css" media="screen" href="css/jquery-ui-1.8.18.custom/css/jquery-ui-1.8.17.custom.css" /&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;link rel="stylesheet" type="text/css" media="screen" href="plugins/jquery.jqGrid-4.3.1/css/ui.jqgrid.css" /&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;script type="text/javascript" src="js/jquery-1.7.1.min.js"&#62;&#60;/script&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;script src="plugins/jquery.jqGrid-4.3.1/js/i18n/grid.locale-en.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;script src="plugins/jquery.jqGrid-4.3.1/js/jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;script src="js/callWebService.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;script&#62;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(document).ready(function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery("#list1").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype:function(jsonData){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;getEmployees();<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; &#160;&#160;&#160; &#160;height:400,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;width:1850,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colNames:[&#39;Employee Name&#39;,&#39;Age&#39;, &#39;Department&#39;, &#39;Salary&#39;,&#39;Description&#39;],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;colModel :[ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; {name:&#39;employeeName&#39;, index:&#39;employeeName&#39;, width:120, align:&#39;left&#39;, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; {name:&#39;age&#39;, index:&#39;age&#39;, width:170, align:&#39;left&#39;, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; {name:&#39;department&#39;, index:&#39;department&#39;, width:90, sortable:true, align:&#39;left&#39;},&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; {name:&#39;salary&#39;, index:&#39;salary&#39;, width:140, align:&#39;left&#39;, sortable:false},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; {name:&#39;description&#39;, index:&#39;description&#39;, width:85, align:&#39;left&#39;}],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;pager: jQuery(&#39;#pager2&#39;),<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;rowList:[10,20,30],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;loadonce:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;scroll:false<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; })</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; function getEmployees()<br />&#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; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var fetchOrderDetailsFrom = &#39;data.json&#39;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var ordersData= callWebService(&#39;GET&#39;, fetchOrderDetailsFrom);</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var parsedOrderData = eval(" (" + ordersData + ") ");</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;for (var i=0;i&#60;parsedOrderData.rows.length;i++)<br />&#160;&#160; &#160;&#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; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$(&#39;#list1&#39;).jqGrid("addRowData",i,parsedOrderData.rows[i]);<br />&#160;&#160; &#160;&#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; &#160;});<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;});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#60;/script&#62;<br />&#160;&#160;&#160; &#60;table id="list1"&#62;&#60;/table&#62;<br />&#160;&#160; &#160;&#60;div id="pager2"&#62;&#60;/div&#62;<br />&#160;&#160; &#160;&#60;br /&#62;<br />&#60;/html&#62;</p>
</p>
<p>=========================================================================</p>
<p>data.json</p>
<p>=========================================================================</p>
<p>{<br />&#160;&#160;&#160; "total": "1",<br />&#160;&#160;&#160; "page": "2",<br />&#160;&#160;&#160; "records": "10",<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; "employeeName": "Mike",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "25",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Sales",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "12000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Sales Dept"<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; "employeeName": "Veron",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "21",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Corporate",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "23000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Corporate"<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; "employeeName": "Vettal",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "29",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Logistics",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "21000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Logistics dept."<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; "employeeName": "Ronaldo",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "32",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Aviation",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "15000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Aviation dept."<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; "employeeName": "Miller",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "35",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Transportation",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "17000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Transportation dept."<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; "employeeName": "George",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "28",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Inventory",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "15000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Inventory Dept"<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; "employeeName": "Mason",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "62",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Accounts",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "23000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Accounts"<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; "employeeName": "Ryan",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "45",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Logistics",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "32000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Logistics dept."<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; "employeeName": "Steve",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "36",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Inventory",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "26000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Inventory dept."<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; "employeeName": "Peter",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "37",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Aviation",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "13500",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Aviation dept."<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; "employeeName": "Steve",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "25",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Inventory",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "26000",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Inventory dept."<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; "employeeName": "Peter",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "age": "54",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "department": "Aviation",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "salary": "16600",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; "description": "Belongs to Aviation dept."<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }&#160;&#160;&#160;&#160;&#160;&#160; &#160;<br />&#160;&#160;&#160; ]<br />}</p>
<p>Please assume my JSON has more records than the example given above.</p>
<p>
Thanks!</p>
]]></description>
        	        	<pubDate>Sat, 31 Mar 2012 16:38:52 +0300</pubDate>
        </item>
</channel>
</rss>