<?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: Create/Update Grid using a Link from A different Grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/createupdate-grid-using-a-link-from-a-different-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/createupdate-grid-using-a-link-from-a-different-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>mrh on Create/Update Grid using a Link from A different Grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/createupdate-grid-using-a-link-from-a-different-grid#p21373</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/createupdate-grid-using-a-link-from-a-different-grid#p21373</guid>
        	        	<description><![CDATA[<p>I have tried using the .trigger("reloadGrid") method but still only the first table 2 is loaded.&#160; Subsequent link clicks does not reload the tbale with new data.</p>
]]></description>
        	        	<pubDate>Tue, 21 Dec 2010 19:09:53 +0200</pubDate>
        </item>
        <item>
        	<title>mrh on Create/Update Grid using a Link from A different Grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/createupdate-grid-using-a-link-from-a-different-grid#p21372</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/createupdate-grid-using-a-link-from-a-different-grid#p21372</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have two functions that create two different grids on a page.&#160; The first grid loads and has unique URLs which use an onclick function call to create another grid on the page.&#160; This works very well for the first grid, however when I click on another URL from the first grid it does not reload the second grid with the new data.&#160; I have tried variations of (reloadGrid) but it&#39;s just not working for me.</p>
<p>Essentially what I am trying to do is when a link is clicked in Grid 1 it updates Grid 2 with new data.&#160; Your help is greatly appreciated.</p>
<p>Here are my functions.&#160; The "buildTable1" function is called from a &#60;body onload&#62; event.&#160; The "buildTable2" function is run when a link is clicked from Table 1 (and like I say, the first Table 2 grid is built fine, but not the others.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2595' value='Select Code' data-codeid='sfcode2595' /></p>
<div class='sfcode' id='sfcode2595'>function buildTable1(idnum){ <br />jQuery(&#34;#table1&#34;).jqGrid(<br />{<br />&#160;&#160; &#160;url:&#39;inc/tables.php?do=funct1&#38;idnum=&#39;+idnum, <br />&#160;&#160; &#160;datatype: &#34;json&#34;,<br />&#160;&#160; &#160;mtype: &#39;GET&#39;, <br />&#160;&#160; &#160;colNames:[&#39;Manager Name&#39;,&#39;Division&#39;,&#39;Region&#39;,&#39;View Team&#39;], <br />&#160;&#160; &#160;colModel:[ <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;name&#39;,index:&#39;name&#39;, width:120, align:&#34;center&#34;, search: false },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;division_code&#39;,index:&#39;division_code&#39;, width:90, align:&#34;center&#34;, searchoptions: { sopt:[&#39;cn&#39;] } },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;region_code&#39;,index:&#39;region_code&#39;, width:90, align:&#34;center&#34;, searchoptions: { sopt:[&#39;cn&#39;] } },<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;emp_id&#39;,index:&#39;emp_id&#39;, width:70, align:&#34;center&#34;,sortable: false, search: false } <br />&#160;&#160; &#160;],<br />&#160;&#160; &#160;sortname: &#39;division_code&#39;,<br />&#160;&#160; &#160;sortorder: &#34;asc&#34;, <br />&#160;&#160; &#160;rowNum:50,<br />&#160;&#160; &#160;pager: &#39;#table1-pager&#39;, <br />&#160;&#160; &#160;viewrecords: true, <br />&#160;&#160; &#160;caption:&#34;Manager List North America&#34;, <br />&#160;&#160; &#160;width: 399,<br />&#160;&#160; &#160;height: &#39;auto&#39; }); <br />&#160;&#160; &#160;jQuery(&#34;#table1&#34;).jqGrid(&#39;navGrid&#39;,&#39;#table1-pager&#39;,{<br />&#160;&#160; &#160;&#160;&#160; &#160;edit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;add:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;del:false });<br />}</div>
<p>My next function is like this which is called from a link in Table 1.</p>
<p>The link in Table 1 looks something like this. onclick="buildTable2(id);"</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit755' value='Select Code' data-codeid='sfcode755' /></p>
<div class='sfcode' id='sfcode755'>function buildTable2(id){<br />&#160;&#160; &#160;jQuery(&#34;#table2&#34;).jqGrid( {<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;url:&#39;inc/tables.php?do=funct2&#38;idnum=&#39;+idnum, <br />&#160;&#160; &#160;datatype: &#34;json&#34;,<br />&#160;&#160; &#160;mtype: &#39;GET&#39;, <br />&#160;&#160; &#160;colNames:[&#39;Name&#39;,&#39;ID&#39;,&#39;Division&#39;,&#39;Region&#39;,&#39;Phone&#39;], <br />&#160;&#160; &#160;colModel:[ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;name&#39;,index:&#39;name&#39;, width:120, align:&#34;center&#34;, search: false },<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;id&#39;,index:&#39;id&#39;, width:70, align:&#34;center&#34;,sortable: false, search: false }, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;division_code&#39;,index:&#39;division_code&#39;, width:90, align:&#34;center&#34;, searchoptions: { sopt:[&#39;cn&#39;] } }, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;region_code&#39;,index:&#39;region_code&#39;, width:90, align:&#34;center&#34;, searchoptions: { sopt:[&#39;cn&#39;] } }, <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;phone_number&#39;,index:&#39;phone_number&#39;, width:120, align:&#34;center&#34;, search: false }<br />],<br />&#160;&#160; &#160;sortname: &#39;name&#39;,<br />&#160;&#160; &#160;sortorder: &#34;asc&#34;, <br />&#160;&#160; &#160;rowNum:50,<br />&#160;&#160; &#160;pager: &#39;#table2-pager&#39;, <br />&#160;&#160; &#160;viewrecords: true, <br />&#160;&#160; &#160;caption:&#34;Team List&#34;, <br />&#160;&#160; &#160;width: 680,<br />&#160;&#160; &#160;height: &#39;auto&#39; }); <br />&#160;&#160; &#160;jQuery(&#34;#table2&#34;).jqGrid(&#39;navGrid&#39;,&#39;#table2-pager&#39;,{<br />&#160;&#160; &#160;&#160;&#160; &#160;edit:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;add:false,<br />&#160;&#160; &#160;&#160;&#160; &#160;del:false });<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />}</div>
<p>I like to put my filters as links in the tables which will then reload the data.&#160; I used to do this purely in PHP but I wanted to start using JQGRID so I am evaluating this but stuck at this point.</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Tue, 21 Dec 2010 18:16:18 +0200</pubDate>
        </item>
</channel>
</rss>