<?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: Master Detail with 3 grids</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/master-detail-with-3-grids</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/master-detail-with-3-grids/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>duntech on Master Detail with 3 grids</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/master-detail-with-3-grids#p21670</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/master-detail-with-3-grids#p21670</guid>
        	        	<description><![CDATA[<p>I have attempted to use the master detail feature however it only allows me to map one grid as a child.&#160; I will have 3 grids, the main one has a customer list, a second grid will contain internet circuits the customer has from us and the third grid will have phone circuits they have from us.&#160; So what I would like is when a customer is selected it then updates the other two grids with circuit and phone number information.&#160; I can get this to work with select a customer and see phone information as well as select a customer and see internet circuit information.&#160; I cannot however get it to work with both together.</p>
<p>I am using the stock grid.php and have copied the stock detail.php to vlan_detail.php and tdm_detail.php.&#160; If I remove vlan_detail.php it shows everything perfect minus vlan_detail.php info.&#160; If I remove tdm_detail.php it shows everything perfect.&#160; I would like it to show both vlan_detail.php AND tdm_detail.php.</p>
<p>My page looks like this:</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;b&#62;Customers&#60;/b&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;?php include ("grid.php");?&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;/div&#62;<br />&#160;&#160;&#160;&#160;&#160; &#60;div&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;b&#62;VLAN Information&#60;/b&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;?php include ("vlan_detail.php");?&#62;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;b&#62;TDM Information&#60;/b&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;?php include ("tdm_detail.php");?&#62;</p>
</p>
<p>UPDATE:&#160; I got it to work with the tech support help below..</p>
</p>
<p>There is nothing special, but maybe you will need to pay attention     on some things:<br /> Considering this example:<br /> <a class="moz-txt-link-freetext" href="/phpjqgrid/examples/selection/masterdetail/default.php" target="_blank"></a><a href="http://www.trirand.com/blog/ph" rel="nofollow" target="_blank">http://www.trirand.com/blog/ph</a>.....efault.php</p>
<p> 1.&#160; you will need to modify the onselect event in MASTER GRID so     that it affect both grids<br /> Suppose you have detail1 and detail2 subgrids</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5506' value='Select Code' data-codeid='sfcode5506' /></p>
<div class='sfcode' id='sfcode5506'>$selectorder&#160;=&#160;&#60;&#60;&#60;ORDER             <br /> function(rowid,&#160;selected)             <br /> {             <br /> &#160;&#160;&#160;&#160;if(rowid&#160;!=&#160;null)&#160;{             <br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jQuery("#detail1").jqGrid(&#39;setGridParam&#39;,{postData:{CustomerID:rowid}});             <br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jQuery("#detail1").trigger("reloadGrid");              </div>
<p><input type='button' class='sfcodeselect' name='sfselectit8762' value='Select Code' data-codeid='sfcode8762' /></p>
<div class='sfcode' id='sfcode8762'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jQuery("#detail2").jqGrid(&#39;setGridParam&#39;,{postData:{CustomerID:rowid}});             <br /> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;jQuery("#detail2").trigger("reloadGrid");              </div>
<p><input type='button' class='sfcodeselect' name='sfselectit8641' value='Select Code' data-codeid='sfcode8641' /></p>
<div class='sfcode' id='sfcode8641'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;             //&#160;Enable&#160;CRUD&#160;buttons&#160;in&#160;navigator&#160;when&#160;a&#160;row&#160;is&#160;selected             <br /> &#160;&#160;&#160; }             <br /> }             <br /> ORDER; </div>
<p> 2. When constructing the second grid be a sure that they have     different id</p>
<p> for detayl1 grid do this </p>
<p><input type='button' class='sfcodeselect' name='sfselectit623' value='Select Code' data-codeid='sfcode623' /></p>
<div class='sfcode' id='sfcode623'>$grid-&#62;renderGrid("#detail1","#pgdetail1",&#160;true,&#160;$summaryrow,&#160;array(&#38;$rowid),&#160;true,true); </div>
<p> for detail2 grid </p>
<p><input type='button' class='sfcodeselect' name='sfselectit3834' value='Select Code' data-codeid='sfcode3834' /></p>
<div class='sfcode' id='sfcode3834'>$grid-&#62;renderGrid("#detail2","#pgdetail2",&#160;true,&#160;$summaryrow,&#160;array(&#38;$rowid),&#160;true,true); </div>
<p>Also don&#39;t forget to define the table on the detail pages.</p>
<p>$grid-&#62;table = "table name";</p>
]]></description>
        	        	<pubDate>Fri, 14 Jan 2011 07:18:57 +0200</pubDate>
        </item>
</channel>
</rss>