<?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 Grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/master-detail-grid</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-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dervaish on Master Detail Grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/master-detail-grid#p2301</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/master-detail-grid#p2301</guid>
        	        	<description><![CDATA[<p>i&#39;ve got it fixed and is now working fine.<img class="spSmiley" style="margin:0" title="Cool" src="/blog/wp-content/plugins/simple-forum/tinymce/plugins/emotions/img/smiley-cool.gif" border="0" alt="Cool" /></p>
]]></description>
        	        	<pubDate>Thu, 02 Oct 2008 22:54:35 +0300</pubDate>
        </item>
        <item>
        	<title>dervaish on Master Detail Grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/master-detail-grid#p2299</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/master-detail-grid#p2299</guid>
        	        	<description><![CDATA[<p>hello&#8230;</p>
</p>
<p>i&#39;m trying to set up a master-detail-grid. master grid works fine but when i click on a row to populate the detail-grid, nothing happens. well for now details-grid is not even showing on the main page. i put the details-grid code in a separate file to check whether code was working or not and it seems its fine. so it seems that the only time detail-grid code is not working is when i have it togather with the master-grid code on the main page.</p>
<p>below is how i have it set up but only the mater-grid shows the records and detail-grid is not even visible. i have tried every possible option to make it work but no luck so far.</p>
<p>also for now i&#39;m not passing any parameters to master_subgrid.php page as for now i&#39;m only trying to make it visible and work on the main page where master-grid is. sql-query parameter is hard-coded and it does return rows [on the separate page which is tester.html]</p>
</p>
<p>&#60;script type=&#8221;text/javascript&#8221;&#62;<br />jQuery(document).ready(function(){<br />jQuery(&#8221;#list10&#8243;).jqGrid({<br />&#160;&#160;&#160; <br />&#160;&#160;&#160; <br />&#160;&#160;&#160; url:&#39;master_server.php&#39;,<br />&#160;&#160;&#160; datatype: &#8220;json&#8221;,<br />&#160;&#160;&#160; <br />&#160;&#160;&#160; colNames:[&#39;OT_ID&#39;,&#39;OT_UserID&#39;, &#39;OT_OrderID&#39;, &#39;Order-Time&#39;,&#39;UniQueQuantityOrdered&#39;,&#39;OrderStatus&#39;],<br />&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;OT_ID&#39;,index:&#39;OT_ID&#39;, width:55},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;OT_UserID&#39;,index:&#39;OT_UserID&#39;, width:90},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;OT_OrderID&#39;,index:&#39;OT_OrderID&#39;, width:100 , sortable:true},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;OT_TimeOfOrder&#39;,index:&#39;OT_TimeOfOrder&#39;, width:80, align:"right"},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;OT_UniqueQuantityOrdered&#39;,index:&#39;OT_UniqueQuantityOrdered&#39;, width:80, align:"right"},&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;OT_OrderStatus&#39;,index:&#39;OT_OrderStatus&#39;, width:80, align:"right"}&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: jQuery(&#39;#pager10&#39;),<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; imgpath: &#39;themes/sand/images&#39;,<br />sortname: &#39;OT_ID&#39;,<br /> viewrecords: true,<br />&#160;&#160; sortorder: &#8220;asc&#8221;,<br />&#160;&#160;&#160; width: 1200,<br />&#160;&#160;&#160; height:400,<br />&#160;&#160;&#160; multiselect: false,<br />&#160;&#160;&#160; caption: &#8220;Orders Header&#8221;,<br />&#160;&#160;&#160; onSelectRow: function(ids)<br />&#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; var ret = jQuery(&#8221;#list10&#8243;).getRowData(ids);<br />&#160;&#160;&#160; &#160;&#160;&#160; alert(ret.OT_UserID+&#8221;_&#8221;+ret.OT_OrderID);<br />&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#8221;#list10_d&#8221;).setGridParam({url:&#8221;master_subgrid.php&#8221;,page:1})<br />&#160;&#160;&#160; &#160;&#160;&#160; .setCaption(&#8221;Orders Detail: &#8220;+ids)<br />&#160;&#160;&#160; &#160;&#160;&#160; .trigger(&#39;reloadGrid&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; // commented out for now<br />&#160;&#160;&#160; &#160;&#160;&#160; /*<br />&#160;&#160;&#160; &#160;&#160;&#160; if(ids == null) <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; ids=0;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(jQuery(&#8221;#list10_d&#8221;).getRecords() &#62;0 )<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#8221;#list10_d&#8221;).setGridParam({url:&#8221;master_subgrid.php&#8221;,page:1})<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; .setCaption(&#8221;Orders Detail: &#8220;+ids);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; .trigger(&#39;reloadGrid&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; &#160;&#160;&#160; else <br />&#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#8221;#list10_d&#8221;).setGridParam({url:&#8221;master_subgrid.php&#8221;,page:1})<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; .setCaption(&#8221;Orders Detail: &#8220;+ids)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; .trigger(&#39;reloadGrid&#39;);&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; }*/<br />&#160;&#160;&#160; }<br />}).navGrid(&#39;#pager10&#39;,{add:false,edit:false,del:false});</p>
<p>// sub-grid but this does not work and is not even visible on the page<br />jQuery(&#8221;#list10_d&#8221;).jqGrid({<br />&#160;&#160;&#160; height: 100,<br />&#160;&#160; &#160;&#160;&#160; url:&#39;master_subgrid.php&#39;,<br />&#160;&#160;&#160; datatype: &#8220;json&#8221;,<br />&#160;&#160; &#160;&#160;&#160; colNames:[&#39;Order-ID&#39;,&#39;Item-ID&#39;,&#39;Details [Name_Price_Discount_Final-Price]&#39;,&#39;Quantity Bought&#39;,&#39;Sub-Total&#39;],<br />&#160;&#160; &#160;&#160;&#160; colModel:[<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Order_ID&#39;,index:&#39;Order_ID&#39;, width:55},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Prod_ID&#39;,index:&#39;Prod_ID&#39;, width:180},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;Prod_Details&#39;,index:&#39;Prod_Details&#39;, width:80, align:"right"},<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;ItemQuantityOrdered&#39;,index:&#39;ItemQuantityOrdered&#39;, width:80, align:"right"},&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;OrderSubTotal&#39;,index:&#39;OrderSubTotal&#39;, width:80,align:"right", sortable:false, search:false}<br />&#160;&#160; &#160;&#160;&#160; ],<br />&#160;&#160; &#160;&#160;&#160; rowNum:5,<br />&#160;&#160; &#160;&#160;&#160; rowList:[5,10,20],<br />&#160;&#160; &#160;&#160;&#160; imgpath: &#39;themes/sand/images&#39;,<br />&#160;&#160; &#160;&#160;&#160; pager: jQuery(&#39;#pager10_d&#39;),<br />&#160;&#160; &#160;&#160;&#160; sortname: &#39;Order_ID&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; sortorder: &#8220;asc&#8221;,<br />&#160;&#160;&#160; multiselect: true,<br />&#160;&#160;&#160; caption: &#8220;Orders Detail&#8221;<br />}).navGrid(&#39;#pager10_d&#39;,{add:false,edit:false,del:false});<br />});<br />&#60;/script&#62;</p>
</p>
<p>&#60;table id=&#8221;list10&#8243; class=&#8221;scroll&#8221; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;&#62;&#60;/table&#62;<br />&#60;div id=&#8221;pager10&#8243; class=&#8221;scroll&#8221; style=&#8221;text-align:center;&#8221;&#62;&#60;/div&#62;<br />&#60;br /&#62;<br />&#60;table id=&#8221;list10_d&#8221; class=&#8221;scroll&#8221; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;&#62;&#60;/table&#62;<br />&#60;div id=&#8221;pager10_d&#8221; class=&#8221;scroll&#8221; style=&#8221;text-align:center;&#8221;&#62;&#60;/div&#62;</p>
</p>
<p>thanx in advance for the help and suggestions.</p>
]]></description>
        	        	<pubDate>Thu, 02 Oct 2008 17:11:13 +0300</pubDate>
        </item>
</channel>
</rss>