<?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: Cannot get grid to render with xmlstring spring mvc controller</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-get-grid-to-render-with-xmlstring-spring-mvc-controller</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/cannot-get-grid-to-render-with-xmlstring-spring-mvc-controller/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>caztheconqueror on Cannot get grid to render with xmlstring spring mvc controller</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cannot-get-grid-to-render-with-xmlstring-spring-mvc-controller#p26855</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cannot-get-grid-to-render-with-xmlstring-spring-mvc-controller#p26855</guid>
        	        	<description><![CDATA[<p>Hi</p>
</p>
<p>I have been struggling with JQgrid for three days. I have tried different data structures. I thought the easiest would be xmlstring. I am able to get the table header up but the rows are consistently empty.</p>
</p>
<p>Please help to tell me what I am doing wrong. I render the xml from a Spring mvc controller. I put it in the request and create a javascript var with the xml.</p>
</p>
<p>var xmlStr = "&#60;%=request.getAttribute("source") %&#62;";</p>
<p>&#160;&#160; &#160;&#160;&#160; &#160;$(function(){ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; $("#dvrList").jqGrid({<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; datatype:&#39;xmlstring&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; datastr:&#39;xmlStr&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; autowidth: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; colNames:[&#39;Title&#39;,&#39;Recording Type&#39;, &#39;Recording Start Date&#39;,&#39;Recording End Date&#39;,&#39;Listed Start Time&#39;,&#39;Listed End Time&#39;,&#39;Recording Status&#39;,&#39;Delete Date&#39;, &#39;Status Before Delete&#39;, &#39;Delete Priority&#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; {name:&#39;Title&#39;,sortable:true}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Recording Type&#39;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Recording Start Date&#39;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Recording End Date&#39;}, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Listed Start Time&#39;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Listed End Time&#39;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Recording Status&#39;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Delete Date&#39;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Status Before Delete&#39;},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Delete Priority&#39;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; pager: &#39;#dvrPager&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; rowNum:10,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; sortname: &#39;Title&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; repeatitems:true,<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; caption: &#39;Dvr Schedule&#39;,<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; }); <br />&#160;&#160; &#160;&#160;&#160; &#160;});</p>
</p>
<p>My xml structure looks like the following.</p>
<p>&#60;?xml version=&#39;1.0&#39; encoding=&#39;utf-8&#39;?&#62;<br />&#60;rows&#62;<br />&#160; &#60;page&#62;1&#60;/page&#62;<br />&#160; &#60;total&#62;1&#60;/total&#62;<br />&#160; &#60;records&#62;3&#60;/records&#62;<br />&#160; &#60;rows&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;row id="1"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Bait Car 1&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Program&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340418600000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;0&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;P3&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;/row&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;row id="2"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Bait Car 2&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Program&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340418600000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;0&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;P3&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;/row&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;row id="3"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Bait Car 3&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;Program&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340418600000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;1340416800000&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;0&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;PendingNoConflict&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;cell&#62;P3&#60;/cell&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;/row&#62;<br />&#160;&#160; &#60;/rows&#62;</p>
</p>
<p>I have tried changing my data structures, I am reversing back to this way of doing it until I can render a table then I can do something more complex with json etc.&#160; I have added the xmlreader then taken it out. I am not to sure if the colmodel is correct. What am I doing wrong?</p>
]]></description>
        	        	<pubDate>Tue, 26 Jun 2012 22:36:58 +0300</pubDate>
        </item>
</channel>
</rss>