<?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: getRowData in grid as subgrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/getrowdata-in-grid-as-subgrid</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/getrowdata-in-grid-as-subgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>jlb30504 on getRowData in grid as subgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getrowdata-in-grid-as-subgrid#p5206</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getrowdata-in-grid-as-subgrid#p5206</guid>
        	        	<description><![CDATA[<p>I added&#160;a gridComplete function for the subgrid and moved my code there.&#160; Works like a champ.&#160;</p>
<p>I would appreciate an explanation as to why the data in the subgrid is not available immediately after the subgrid code executes.</p>
]]></description>
        	        	<pubDate>Tue, 10 Mar 2009 22:50:20 +0200</pubDate>
        </item>
        <item>
        	<title>jlb30504 on getRowData in grid as subgrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getrowdata-in-grid-as-subgrid#p5205</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getrowdata-in-grid-as-subgrid#p5205</guid>
        	        	<description><![CDATA[<p>Someone please help the newby with a problem.&#160; I am using version 3.4.2 in a Windows environment.&#160;</p>
<p>I have a grid as a subgrid.&#160; I am trying to read data from the subgrid in the function for the subGridRowExpanded event.&#160; getRowData and getCell come back with undefined values.&#160; This logic works fine if it is a click function external to the subgrid but not in the subGridRowExpanded event.</p>
<p>What am I missing here? Code below.</p>
<p>Thanks,</p>
<p>Jerry</p>
<p>jQuery("#list").jqGrid({<br />&#160;&#160;&#160;<a href="&#39;cem_db_if.php?q=1&#39;" target="_blank">url:&#39;cem_db_if.php?q=1&#39;</a>,<br />&#160;&#160;&#160;colNames:[&#39;Cemetery&#39;,&#39;USGS GNIS ID&#39;, &#39;County&#39;,&#39;USGS map&#39;,&#39;Location&#39;],<br />&#160;&#160;&#160;colModel :[ <br />&#160;&#160;&#160;&#160; {name:&#39;cem_name&#39;, index:&#39;cem_name&#39;, width:200, align:&#39;center&#39;}, <br />&#160;&#160;&#160;&#160; {name:&#39;cem_usgs&#39;, index:&#39;cem_usgs&#39;, width:100, align:&#39;center&#39;}, <br />&#160;&#160;&#160;&#160; {name:&#39;cem_county_name&#39;, index:&#39;cem_county_name&#39;, width:100, align:&#39;center&#39; }, <br />&#160;&#160;&#160;&#160; {name:&#39;cem_map&#39;, index:&#39;cem_map&#39;, width:100, align:&#39;center&#39;}, <br />&#160;&#160;&#160;&#160; {name:&#39;cem_description_short&#39;, index:&#39;cem_description_short&#39;, width:400, align:&#39;center&#39;} ],<br />&#160;&#160;&#160;height:&#39;auto&#39;,<br />&#160;&#160;&#160;pager: &#39;#pager&#39;,<br />&#160;&#160;&#160;rowNum:15,<br />&#160;&#160;&#160;rowList:[15,30,60],<br />&#160;&#160;&#160;sortname: &#39;cem_name&#39;,<br />&#160;&#160;&#160;sortorder: "asc",<br />&#160;&#160;&#160;mtype: &#39;POST&#39;,<br />&#160;&#160;&#160;postData:{table_name:"DT_Cemetery"},&#160;&#160;&#160; <br />&#160;&#160;&#160;viewrecords: true,<br />&#160;&#160;&#160;imgpath: &#39;themes/basic/images&#39;,<br />&#160;&#160;&#160;caption: &#39;TNGenWeb Cemetery Database - Cemeteries&#39;,<br />&#160;&#160;&#160;shrinkToFit: &#39;true&#39;,<br />&#160;&#160;&#160;width:880,<br />&#160;&#160;&#160;subGrid:&#39;true&#39;,<br />&#160;&#160;&#160;subGridRowExpanded: function(subgrid_id, row_id) { <br />&#160;&#160;&#160;&#160;var subgrid_table_id;<br />&#160;&#160;&#160;&#160;subgrid_table_id = subgrid_id+"_t";<br />&#160;&#160;&#160;&#160;&#160;jQuery("#"+subgrid_id).html("&#60;table id=&#39;"+subgrid_table_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;");<br />&#160;&#160;&#160;&#160;&#160;jQuery("#"+subgrid_table_id).jqGrid({ <br />&#160;&#160;&#160;&#160;&#160;&#160;<a href="&#34;cem_db_if.php?q=3&#38;id=&#34;+row_id" target="_blank">url:"cem_db_if.php?q=3&#38;id="+row_id</a>, <br />&#160;&#160;&#160;&#160;&#160;&#160;datatype: "xml", <br />&#160;&#160;&#160;&#160;&#160;&#160;colNames: [&#39;Cemetery detail&#39;,&#39;&#39;], <br />&#160;&#160;&#160;&#160;&#160;&#160;colModel: [ <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;{name:"item",width:150, align:&#39;right&#39;}, <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;{name:"prop",width:200, align:&#39;left&#39;}], <br />&#160;&#160;&#160;&#160;&#160;&#160;height:&#39;auto&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;rowNum:20, <br />&#160;&#160;&#160;&#160;&#160;&#160;imgpath: &#39;themes/basic/images&#39;<br />&#160;&#160;&#160;&#160;&#160;});//end subgrid<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<br />&#160;&#160;&#160;&#160;&#160;//get latitude from subgrid to draw google map<br />&#160;&#160;&#160;&#160;&#160;alert("#"+subgrid_table_id);<br />&#160;&#160;&#160;&#160;&#160;var lat = jQuery("#"+subgrid_table_id).getRowData(6);<br />&#160;&#160;&#160;&#160;&#160;alert("item="+lat.item+" prop="+lat.prop+"...");</p>
<p>&#160;&#160;&#160;&#160;}//end function<br />&#160;&#160;}).navGrid(&#39;#pager&#39;,{edit:false,add:false,del:false})</p>
]]></description>
        	        	<pubDate>Tue, 10 Mar 2009 22:09:09 +0200</pubDate>
        </item>
</channel>
</rss>