<?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: Grid As SubGrid with loadComplete</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-with-loadcomplete</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/grid-as-subgrid-with-loadcomplete/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Grid As SubGrid with loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-with-loadcomplete#p3743</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-with-loadcomplete#p3743</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The problem that you have is how you call the function in the subgrid.</p>
<p>You call it like this</p>
<p>loadComplete: createStatusActions(subgrid_table_id)</p>
</p>
<p>The right is:</p>
<p>loadComplete: createStatusActions</p>
</p>
<p>Or simple if you want to thest make this:</p>
<p>loadComplete:function() {</p>
<p>// here the code from createStatusActions</p>
<p>}</p>
</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 29 Dec 2008 03:16:23 +0200</pubDate>
        </item>
        <item>
        	<title>Compi on Grid As SubGrid with loadComplete</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-with-loadcomplete#p3701</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-with-loadcomplete#p3701</guid>
        	        	<description><![CDATA[<p>Hello everybody,</p>
<p>I want to have a loadComplete action in a subGrid.</p>
<p>So I made a grid in my grid as subgrid.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9954' value='Select Code' data-codeid='sfcode9954' /></p>
<div class='sfcode' id='sfcode9954'>&#160;&#160;&#160; $(&#8221;#datagrid&#8221;).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;Message.action&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#8220;json&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames:[&#39;&#60;s:property value="documentIdColumnName"/&#62; &#39;, &#39;&#60;s:property value="statusColumnName"/&#62; &#39;&#60;s:iterator id="col" value="columns"&#62;,&#39;&#60;s:property value="value"/&#62;&#39;&#60;/s:iterator&#62;, &#39;errors&#39;, &#39;actions&#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; {name:&#39;id&#39;,index:&#39;id&#39;, width:150, align:&#39;center&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;status&#39;,index:&#39;status&#39;, width:100, align:&#39;center&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;s:iterator id="col" value="columns"&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;&#60;s:property value="value"/&#62;&#39;,index:&#39;&#60;s:property value="value"/&#62;&#39;, width:100, align:&#39;center&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/s:iterator&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;errors&#39;, index:&#39;errors&#39;,hidden:true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;actions&#39;, index:&#39;actions&#39;, width:100, align:&#39;left&#39;}],<br />&#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; rowList:[10,20,30],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: &#39;themes/coffee/images&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pager: jQuery(&#39;#pagerInProgress&#39;),<br />&#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; sortorder: &#8220;desc&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; width: &#8220;780&#8243;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; height: &#8220;auto&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; caption:&#8221;&#60;s:property value=&#8221;gridName&#8221;/&#62;&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadComplete: createContentActions,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; toolbar: [true,"bottom"],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; subGrid: true,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; subGridRowExpanded: function(subgrid_id, row_id) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; var subgrid_table_id;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; subgrid_table_id = subgrid_id+&#8221;_t&#8221;;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#&#8221;+subgrid_id).html(&#8221;&#60;table id=&#39;&#8221;+subgrid_table_id+&#8221;&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#8221;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jQuery(&#8221;#&#8221;+subgrid_table_id).jqGrid({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#8221;Message/History.action?id=&#8221; + row_id,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; datatype: &#8220;json&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; colNames: [&#39;id&#39;, &#39;previous status&#39;,&#39;update&#39;, &#39;actions&#39;],<br />&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;id&#39;,index:&#39;id&#39;, width:150, align:&#39;center&#39;},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:"previous status",index:"previous status",width:250},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:"update",index:"update",width:250,sortable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;actions&#39;, index:&#39;actions&#39;, width:100, align:&#39;left&#39;,sortable:false}<br />&#160;&#160;&#160;&#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; height: &#8220;auto&#8221;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#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;&#160;&#160;&#160;&#160;&#160;&#160; imgpath: &#39;themes/coffee/images&#39;,<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loadComplete: createStatusActions(subgrid_table_id)<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; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });</div>
<p>So in my maingrid I have:</p>
<p><span class="sfcode">loadComplete: createContentActions</span></p>
<p>And that method looks like:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2984' value='Select Code' data-codeid='sfcode2984' /></p>
<div class='sfcode' id='sfcode2984'>
<p>function createContentActions() {</p>
<p>var ids = $(&#8221;#datagrid&#8221;).getDataIDs();</p>
<p>do some cool stuff&#8230;</p>
<p>}</p>
</div>
<p>This works great but in my subgrid I have:</p>
<p><span class="sfcode">&#160;&#160;&#160; loadComplete: createStatusActions(subgrid_table_id)</span></p>
<p>And that method looks like</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7165' value='Select Code' data-codeid='sfcode7165' /></p>
<div class='sfcode' id='sfcode7165'>
<p>&#160;&#160;&#160; function createStatusActions(grid_table_id) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; var ids = jQuery(&#8221;#&#8221; + grid_table_id).getDataIDs();</p>
<p>do some cool stuff &#8230;</p>
<p>}</p>
</div>
<p>And this doesn&#39;t work.&#160; My ids in createStatusAction, wich is called for the subgrid is always empty.&#160; So this method is called before my grid is loaded.&#160;&#160;&#160; And I have also tried: gridComplete, with the same result.</p>
</p>
<p>Can someone help me.&#160; If hope the case is clear.</p>
</p>
<p>Thank you.</p>
<p>Compi &#160;&#160;&#160;</p></p>
]]></description>
        	        	<pubDate>Wed, 24 Dec 2008 07:48:34 +0200</pubDate>
        </item>
</channel>
</rss>