<?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: 2 Questions about jqGrid (Subgrid) and json(string)</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring</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/2-questions-about-jqgrid-subgrid-and-jsonstring/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on 2 Questions about jqGrid (Subgrid) and json(string)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8507</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8507</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>About the second question.</p>
<p>The addRowData currently does not support this. I suggest you to use datatype as function - see docs and addJSONData method to add data. This method support this named convention.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 01:56:41 +0300</pubDate>
        </item>
        <item>
        	<title>tony on 2 Questions about jqGrid (Subgrid) and json(string)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8506</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8506</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:subgrid#methods" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....id#methods</a></p>
</p>
<p>One note (which I will correct into the docs)</p>
<p>If you use subGridJson you should use the method this way:</p>
<p>var mygrid = jQuery("#mygrid")[0];</p>
<p>mygrid.subGridJson(arraydata,rowid)</p>
]]></description>
        	        	<pubDate>Thu, 13 Aug 2009 01:53:04 +0300</pubDate>
        </item>
        <item>
        	<title>Arne on 2 Questions about jqGrid (Subgrid) and json(string)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8445</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/2-questions-about-jqgrid-subgrid-and-jsonstring#p8445</guid>
        	        	<description><![CDATA[<p>Hi everybody</p>
</p>
<p>I&#39;m developping a web application with Java, Springframework, DWR and JQuery.</p>
<p>My first grid was successful.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5743' value='Select Code' data-codeid='sfcode5743' /></p>
<div class='sfcode' id='sfcode5743'>$("#sortable").jqGrid({<br />&#160;&#160; datatype: &#39;jsonstring&#39;,<br />&#160;&#160; userdata: mydata,<br />&#160;&#160; colNames:[<br />&#160;&#160;&#160;&#160; &#39;&#60;spring:message code="label"/&#62;&#39;,<br />&#160;&#160;&#160;&#160; &#39;&#60;spring:message code="label"/&#62;&#39;<br />&#160;&#160; ],<br />&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160; { name:&#39;field1&#39;, index:&#39;field1&#39;, sortable:true, sorttype:&#39;int&#39; },<br />&#160;&#160;&#160;&#160; { name:&#39;field2&#39;, index:&#39;field2&#39;, sortable:false }<br />&#160;&#160; ],<br />&#160;&#160; emptyrecords: "&#60;spring:message code="label"/&#62;",<br />&#160;&#160; hoverrows: true,<br />&#160;&#160; toolbar: [true, "bottom"],			<br />&#160;&#160; width: 653,<br />&#160;&#160; height: 300<br /> });</div>
<p><input type='button' class='sfcodeselect' name='sfselectit4548' value='Select Code' data-codeid='sfcode4548' /></p>
<div class='sfcode' id='sfcode4548'>var mydata = [<br />&#160;&#160; &#60;c:forEach var="item" items="${listAsJson}" varStatus="status"&#62;<br />&#160;&#160;&#160;&#160; &#60;c:choose&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;c:when test="${status.last}"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ${item}<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;/c:when&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;c:otherwise&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ${item},<br />&#160;&#160;&#160;&#160;&#160;&#160; &#60;/c:otherwise&#62;<br />&#160;&#160;&#160;&#160; &#60;/c:choose&#62;<br />&#160; &#60;/c:forEach&#62;<br /> ];</div>
<p><input type='button' class='sfcodeselect' name='sfselectit1355' value='Select Code' data-codeid='sfcode1355' /></p>
<div class='sfcode' id='sfcode1355'>for(var i=0;i&#60;=mydata.length;i++) {<br />&#160; $("#sortable").addRowData(i+1,mydata[i]);<br />}</div>
</p>
<p>But now I need some sub grids.</p>
<p>The problem is, that I don&#39;t know, how to add the rows into the sub grid. I still have all datas in the response (I&#39;m looking for the datas in the previous Spring-Controller and add them into the request).</p>
</p>
<p>The second question is about json. I have objects in objects. The json string looks ok, or doesn&#39;t it?</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3096' value='Select Code' data-codeid='sfcode3096' /></p>
<div class='sfcode' id='sfcode3096'>{ "name": "test", "phone": "111",&#160; "address": { "street": "street" } }</div>
</p>
<p>But if I change the ColModel to:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8412' value='Select Code' data-codeid='sfcode8412' /></p>
<div class='sfcode' id='sfcode8412'>colModel:[<br />&#160; { name:&#39;address.street&#39;, index:&#39;address.street&#39; }<br />],</div>
<p>I don&#39;t get any results.</p>
</p>
<p>It makes me ... :S</p>
</p>
<p>Best regards</p>
<p>Arne</p></p>
]]></description>
        	        	<pubDate>Tue, 11 Aug 2009 10:08:44 +0300</pubDate>
        </item>
</channel>
</rss>