<?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 not displaying rows</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-displaying-rows</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/jqgrid-not-displaying-rows/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mithilwane on jqgrid not displaying rows</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-displaying-rows#p30590</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-not-displaying-rows#p30590</guid>
        	        	<description><![CDATA[<p>JQGrid version &#8211; 4.6 JQuery Version &#8211; 1.10</p>
<p>The Rows are shown in HTML. But jqgrid doesnot show the rows. Have even tried adding row one by one instead. But didnt help. I am new to JQgrid. I am just trying these things in my code based on the examples on the internet. I am totally unable to understand what is going wrong here.</p>
<p>This is my jquery code</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2058' value='Select Code' data-codeid='sfcode2058' /></p>
<div class='sfcode' id='sfcode2058'>$(&#34;#tblStateTableData&#34;).jqGrid({     datatype: &#39;local&#39;,     width: 800, //specify width; optional     colNames:[&#39;State Code&#39;,&#39;State Name&#39;, &#39;Active Y/N&#39;], //define column names     colModel:[     {name:&#39;id&#39;, index:&#39;id&#39;, key: true, width:100, hidden:false},     {name:&#39;stateNm&#39;, index:&#39;stateNm&#39;, width:150, hidden:false},     {name:&#39;activeYn&#39;, index:&#39;activeYn&#39;, width:100, edittype:&#34;checkbox&#34;,                     hidden:false}     ], //define column models     pager: &#39;#pager&#39;, //set your pager div id     rowNum:10,     sortname: &#39;id&#39;, //the column according to which data is to be sorted;              //optional     viewrecords: true, //if true, displays the total number of records, etc.              //as: &#34;View X to Y out of Z&#8221; optional     sortorder: &#34;asc&#34;, //sort order; optional         });      function getCountryCode() {     var countryCd = $(&#39;#txtCountry&#39;).val();     $(&#34;#txtCountryCd&#34;).val(countryCd);     if (countryCd != &#34;&#34;) {         $.post(&#34;getStateTableList.html&#34;,{             &#34;countryCd&#34; : countryCd         },function(data) {             data = $.parseJSON(data);             if (data.status == &#34;success&#34;) {                 var stateTableList = data.stateTableList;                 $(&#39;#tblStateTableData&#39;).jqGrid(&#39;setGridParam&#39;,                                      {datatype:&#34;jsonstring&#34;                  ,datastr:stateTableList}).trigger(&#39;reloadGrid&#39;);                                 }         });              } }</div>
</p>
<p>The JSON Returned from Java Code is as follows</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8311' value='Select Code' data-codeid='sfcode8311' /></p>
<div class='sfcode' id='sfcode8311'>&#34;{&#34;page&#34;:&#34;1&#34;,&#34;records&#34;:7,&#34;rows&#34;:[{&#34;cell&#34;:[&#34;MELBOURNE&#34;,&#34;Y&#34;],&#34;id&#34;:1},{&#34;cell&#34;:[&#34;NEW SOUTH      WALES&#34;,&#34;Y&#34;],&#34;id&#34;:7},{&#34;cell&#34;:[&#34;QUEENSLAND&#34;,&#34;Y&#34;],&#34;id&#34;:6},{&#34;cell&#34;:[&#34;SOUTH  AUSTRALIA&#34;,&#34;Y&#34;],&#34;id&#34;:3},{&#34;cell&#34;:[&#34;TASMANIA&#34;,&#34;Y&#34;],&#34;id&#34;:5},{&#34;cell&#34;: [&#34;VICTORIA&#34;,&#34;Y&#34;],&#34;id&#34;:4},{&#34;cell&#34;:[&#34;WESTERN AUSTRALIA&#34;,&#34;Y&#34;],&#34;id&#34;:2}],&#34;total&#34;:&#34;1&#34;}&#34;</div>
</p>
<p>And here is Java Code</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9732' value='Select Code' data-codeid='sfcode9732' /></p>
<div class='sfcode' id='sfcode9732'>JqgridModel grid =  new JqgridModel(); grid.setPage(&#34;1&#34;); grid.setRecords(stateListObj.size()); grid.setTotal(&#34;1&#34;);  List rows = new ArrayList&#60;&#62;();  for (EppsStateMst eppsStateMst : stateListObj) { JQGridRow row = new JQGridRow(); row.setId(eppsStateMst.getId().getStateCd()); List cells = new ArrayList(); cells.add(eppsStateMst.getStateNm()); cells.add(eppsStateMst.getActiveYn()); row.setCell(cells); rows.add(row); }  grid.setRows(rows);  JSONSerializer serializer = new JSONSerializer(); String jsonResult = serializer.exclude(&#34;*.class&#34;).deepSerialize(grid);  json.addProperty(&#34;status&#34;, &#34;success&#34;); json.addProperty(&#34;stateTableList&#34;, jsonResult);  return json.toString();</div>
]]></description>
        	        	<pubDate>Tue, 06 May 2014 20:54:22 +0300</pubDate>
        </item>
</channel>
</rss>