<?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: Rows not being displayed for local or json data</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data</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/rows-not-being-displayed-for-local-or-json-data/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>DadOnRed on Rows not being displayed for local or json data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16646</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16646</guid>
        	        	<description><![CDATA[<p>Would you mind reposting your current / working code for local array data? I&#39;ve got a similar problem (not working at all, trying to get through the basic demo code on the site). Appreciate any help here!</p>
</p>
<p>Here is what I currently have:</p>
</p>
<p>&#60;head&#62;</p>
<p>&#60;link rel="stylesheet" type="text/css" media="screen" href="./jquery-ui-1.7.2.custom.css" /&#62;<br />&#60;link rel="stylesheet" type="text/css" media="screen" href="./ui.jqgrid.css" /&#62;<br />&#60;script src="./grid.locale-en.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#60;script src="./jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;<br />&#160;&#60;script type="text/javascript"&#62;&#160; &#160;<br />&#160;jQuery(document).ready(function(){<br />&#160;&#160;&#160; jQuery("#list4").jqGrid({ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;datatype: "local", <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: 250, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;Backup No&#39;,&#39;Date&#39;, &#39;Size&#39;, &#39;Direction&#39;,&#39;Elapsed Time&#39;,&#39;Completed?&#39;,&#39;Notes&#39;], <br />&#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; &#160;{name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;bkupdate&#39;,index:&#39;bkupdate&#39;, width:90, sorttype:"date"}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;size&#39;,index:&#39;size&#39;, width:60}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;direction&#39;,index:&#39;direction&#39;, width:150, align:"left",sorttype:"float"}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;dur&#39;,index:&#39;dur&#39;, width:80, align:"right",sorttype:"float"}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;succ&#39;,index:&#39;succ&#39;, width:30,align:"right",sorttype:"float"}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false} <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ], <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; pager: jQuery(&#39;#pager&#39;),<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; viewrecords: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; multiselect: true, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption: "Offsite Data Transfer Log Summary" <br />&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160;&#160;&#160; var mydata = [ <br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{id:"1",bkupdate:"2010-04-30",size:"12GB",direction:"LAN to DC1",dur:"450",succ:"Y",note:"note"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{id:"2",bkupdate:"2010-04-29",size:"12GB",direction:"LAN to DC1",dur:"430",succ:"Y",note:"note2"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"3",bkupdate:"2010-04-28",size:"11GB",direction:"LAN to DC1",dur:"420",succ:"Y",note:"note3"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"4",bkupdate:"2010-04-27",size:"11GB",direction:"LAN to DC2",dur:"425",succ:"Y",note:"note"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"5",bkupdate:"2010-04-26",size:"10GB",direction:"LAN to DC1",dur:"410",succ:"Y",note:"note2"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"6",bkupdate:"2010-04-25",size:"10GB",direction:"LAN to DC1",dur:"400",succ:"Y",note:"note3"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"7",bkupdate:"2010-04-24",size:"9GB",direction:"LAN to DC1",dur:"390",succ:"Y",note:"note"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"8",bkupdate:"2010-04-23",name:"9GB",direction:"LAN to DC1",dur:"380",succ:"Y",note:"note2"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {id:"9",bkupdate:"2010-04-22",name:"8GB",direction:"LAN to DC1",dur:"375",succ:"Y",note:"note3"} <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; for(var i=0;i&#60;=mydata.length;i++) <br />&#160;&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; jQuery("#list4").addRowData(i+1,mydata[i]);<br />&#160; });<br />&#160;&#60;/script&#62;<br />&#60;/head&#62;</p>
]]></description>
        	        	<pubDate>Sat, 24 Apr 2010 21:09:21 +0300</pubDate>
        </item>
        <item>
        	<title>sdebaun on Rows not being displayed for local or json data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16569</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16569</guid>
        	        	<description><![CDATA[<p>Whiskey Tango Foxtrot.</p>
<p>Apparently this:<br />
{<br />
"total": "2",<br />
"page": "1",<br />
"records": "2",<br />
"rows": [<br />
{<br />
"id": "1",<br />
"cell": ["Michael Smith", "Wanker"]<br />
},<br />
{<br />
"id": "2",<br />
"cell": ["Raymond Shaw", "Also Wanker"]<br />
}<br />
]<br />
}</p>
<p>Is not equivalent to this:<br />
{<br />
total: "2",<br />
page: "1",<br />
records: "2",<br />
rows: [<br />
{<br />
id: "1",<br />
cell: ["Michael Smith", "Wanker"]<br />
},<br />
{<br />
id: "2",<br />
cell: ["Raymond Shaw", "Also Wanker"]<br />
}<br />
]<br />
}</p>
<p>While the JS that defines the grid doesn't require quotes around key names in hashes, the JSON data returned from the server does...?</p>
<p>Well, it's working now.  I'm going to go find a baby to punch to relieve my frustration.</p>
]]></description>
        	        	<pubDate>Tue, 20 Apr 2010 20:08:25 +0300</pubDate>
        </item>
        <item>
        	<title>sdebaun on Rows not being displayed for local or json data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16567</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16567</guid>
        	        	<description><![CDATA[<p>Bump?</p>
</p>
<p>This has to be something stupid, like library version incompatibility. &#160;I&#39;ll try switching around what versions I&#39;m using and see if that helps.</p>
</p>
<p>UPDATE:</p>
</p>
<p>Switched library versions, to no avail.</p>
</p>
<p>For shits and giggles, I switched this call:</p>
<p>$("#list4&#8243;).jqGrid(&#39;addRowData&#39;,i+1,mydata[i]);</p>
<p>to this call:</p>
<p>("#list4&#8243;).addRowData(i+1,mydata[i]);</p>
<p>and it worked. &#160;Wtf.</p>
</p>
<p>Now off to wrestle with the json version and see why its not working. 🙂</p>
]]></description>
        	        	<pubDate>Tue, 20 Apr 2010 18:24:14 +0300</pubDate>
        </item>
        <item>
        	<title>sdebaun on Rows not being displayed for local or json data</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16552</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/rows-not-being-displayed-for-local-or-json-data#p16552</guid>
        	        	<description><![CDATA[<p>I&#39;ve been beating my head against this all day; I&#39;m hoping this is something stupid that everyone knows about except for me. 🙂</p>
</p>
<p>I&#39;m using jquery 1.4.2, jquery-ui 1.8, jqgrid 3.5.3.</p>
</p>
<p>I can&#39;t get rows to show up in the grid at all. &#160;The grid itself displays, with the appropriate column headings. &#160;I get the same result in Chrome and in Firefox. &#160;Initially, I was using json to get the rows. &#160;In my attempts to isolate the problem I&#39;ve finally ended up using the code straight from the example at:</p>
</p>
<p>/blog/jqgrid/jqgrid.html</p>
</p>
<p>Under Loading Data: Array Data.</p>
</p>
<p>This is driving me nuts. &#160;Does anyone have any suggestions? &#160;The only thing I can think of now is some sort of incompatibility with the versions of jquery, jquery-ui, and jqgrid.</p>
</p>
<p>&#60;html&#62;</p>
<p>&#60;head&#62;</p>
<p>&#60;link href="./Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" /&#62;</p>
<p>&#60;script src="./Scripts/jquery-1.4.2.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="./Scripts/jquery-ui-1.8.custom.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script src="./Scripts/jquery.jqGrid.min.js" type="text/javascript"&#62;&#60;/script&#62;</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p>$(document).ready( function() {</p>
</p>
<p>jQuery("#list4").jqGrid({</p>
<p>datatype: "local",</p>
<p>height: 250,</p>
<p>colNames:[&#39;Inv No&#39;,&#39;Date&#39;, &#39;Client&#39;, &#39;Amount&#39;,&#39;Tax&#39;,&#39;Total&#39;,&#39;Notes&#39;],</p>
<p>colModel:[</p>
<p>{name:&#39;id&#39;,index:&#39;id&#39;, width:60, sorttype:"int"},</p>
<p>{name:&#39;invdate&#39;,index:&#39;invdate&#39;, width:90, sorttype:"date"},</p>
<p>{name:&#39;name&#39;,index:&#39;name&#39;, width:100},</p>
<p>{name:&#39;amount&#39;,index:&#39;amount&#39;, width:80, align:"right",sorttype:"float"},</p>
<p>{name:&#39;tax&#39;,index:&#39;tax&#39;, width:80, align:"right",sorttype:"float"},</p>
<p>{name:&#39;total&#39;,index:&#39;total&#39;, width:80,align:"right",sorttype:"float"},</p>
<p>{name:&#39;note&#39;,index:&#39;note&#39;, width:150, sortable:false}</p>
<p>],</p>
<p>multiselect: true,</p>
<p>caption: "Manipulating Array Data"</p>
<p>});</p>
<p>var mydata = [</p>
<p>{id:"1",invdate:"2007-10-01",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},</p>
<p>{id:"2",invdate:"2007-10-02",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},</p>
<p>{id:"3",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"},</p>
<p>{id:"4",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},</p>
<p>{id:"5",invdate:"2007-10-05",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},</p>
<p>{id:"6",invdate:"2007-09-06",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"},</p>
<p>{id:"7",invdate:"2007-10-04",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"},</p>
<p>{id:"8",invdate:"2007-10-03",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"},</p>
<p>{id:"9",invdate:"2007-09-01",name:"test3",note:"note3",amount:"400.00",tax:"30.00",total:"430.00"}</p>
<p>];</p>
<p>for(var i=0;i&#60;=mydata.length;i++)</p>
<p>jQuery("#list4").jqGrid(&#39;addRowData&#39;,i+1,mydata[i]);</p>
</p>
<p>});</p>
<p>&#60;/script&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p>&#60;table id="list4"&#62;&#60;/table&#62;</p>
<p>&#60;/body&#62;</p>
<p>&#60;/html&#62;</p>
]]></description>
        	        	<pubDate>Tue, 20 Apr 2010 06:39:23 +0300</pubDate>
        </item>
</channel>
</rss>