<?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: two grids on the same page</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/two-grids-on-the-same-page</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/two-grids-on-the-same-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on two grids on the same page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/two-grids-on-the-same-page#p6877</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/two-grids-on-the-same-page#p6877</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Could you please try to use only one jQuery(document).ready(..</p>
<p>Instead of two?</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 25 May 2009 02:42:00 +0300</pubDate>
        </item>
        <item>
        	<title>black_eyed84 on two grids on the same page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/two-grids-on-the-same-page#p6846</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/two-grids-on-the-same-page#p6846</guid>
        	        	<description><![CDATA[<p>Hi,<br />I have problem with displaing two grids on the same page.<br />first grid:<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#60;table id="list2" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#60;div id="pager2" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;<br />second grid:<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#60;table id="list3" class="scroll" cellpadding="0" cellspacing="0"&#62;&#60;/table&#62;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#60;div id="pager3" class="scroll" style="text-align:center;"&#62;&#60;/div&#62;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />definition for first grid:</p>
<p>jQuery(document).ready(function(){<br />var lastsel;<br />jQuery(&#39;#list2&#39;).jqGrid({<br />&#160;&#160;&#160; url:&#39;&#60;?php echo "$mosConfig_live_site"; ?&#62;/components/com_tabs/tabela.php?nd=&#39;+new Date().getTime()+&#39;&#38;kat=&#60;?php echo $_GET[kat]; ?&#62;&#39;+&#39;&#38;lang=&#60;?php echo $_GET[lang]; ?&#62;&#39;+&#39;&#38;userid=&#60;?php echo $userid; ?&#62;&#39;,<br />&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160; colNames:[&#39;-&#39;,&#39;NDB_No&#39;,&#39;Name&#39;,&#39;B&#39;,&#39;C&#39;,&#39;D&#39;,&#39;E&#39;],<br />&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;act&#39;,index:&#39;act&#39;, width:30,sortable:false, editable:false},&#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;NDB_No&#39;,index:&#39;NDB_No&#39;, width:55, editable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Name&#39;,index:&#39;name&#39;, width:600, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;B&#39;,index:&#39;Nutr_Val&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;C&#39;,index:&#39;tl&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;D&#39;,index:&#39;weglo&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;E&#39;,index:&#39;ener&#39;, width:55, editable:false}<br />&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: jQuery(&#39;#pager2&#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 />&#160;&#160;&#160; sortname: &#39;NDB_No&#39;,<br />&#160;&#160;&#160; mtype: "POST", <br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; sortorder: "asc",<br />&#160;&#160;&#160; loadComplete: function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; var ids = jQuery(&#39;#list2&#39;).getDataIDs();<br />&#160;&#160;&#160; &#160;&#160;&#160; for(var i=0;i&#60;ids.length;i++){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var cl = ids[i];&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; be = "&#60;input style=&#39;height:16px;width:16px;&#39; name=&#39;dodaj&#39; type=&#39;image&#39; SRC=&#39;&#60;?php echo "$mosConfig_live_site"; ?&#62;/images/dodatkowe/add.png&#39; onclick=&#39;add_prompt("+cl+");&#39; /&#62;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list2&#39;).setRowData(ids[i],{act:be});<br />&#160;&#160;&#160; &#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; },<br />&#160;&#160;&#160; onSelectRow: function(id){ <br />&#160;&#160;&#160; &#160;&#160;&#160; if(id &#38;&#38; id!==lastsel){ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list2&#39;).restoreRow(lastsel); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list2&#39;).editRow(id,true);&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; lastsel=id; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; },&#160;&#160;&#160; <br />&#160;&#160;&#160; editurl: "&#60;?php echo "$mosConfig_live_site"; ?&#62;/components/com_tabs/tabela.php",&#160;&#160;&#160; <br />&#160;&#160;&#160; caption: "Produkty"<br />}).navGrid(&#39;#pager2&#39;,{add:false,del:false,edit:false,position:&#39;right&#39;});<br />})</p>
<p>definition for second grid:<br />jQuery(document).ready(function(){<br />var lastsel3;<br />jQuery(&#39;#list3&#39;).jqGrid({<br />&#160;&#160;&#160; url:&#39;&#60;?php echo "$mosConfig_live_site"; ?&#62;/components/com_tabs/tabela_dod.php?nd=&#39;+new Date().getTime()+&#39;&#38;kat=&#60;?php echo $_GET[kat]; ?&#62;&#39;+&#39;&#38;lang=&#60;?php echo $_GET[lang]; ?&#62;&#39;+&#39;&#38;userid=&#60;?php echo $userid; ?&#62;&#39;,<br />&#160;&#160;&#160; datatype: "json",<br />&#160;&#160;&#160; colNames:[&#39;-&#39;,&#39;NDB_No&#39;,&#39;Name&#39;,&#39;B&#39;,&#39;C&#39;,&#39;D&#39;,&#39;E&#39;],<br />&#160;&#160;&#160; colModel:[<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;act&#39;,index:&#39;act&#39;, width:30,sortable:false, editable:false},&#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;NDB_No&#39;,index:&#39;NDB_No&#39;, width:55, editable:false},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {name:&#39;Name&#39;,index:&#39;name&#39;, width:600, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;B&#39;,index:&#39;Nutr_Val&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;C&#39;,index:&#39;tl&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;D&#39;,index:&#39;weglo&#39;, width:55, editable:false},<br />&#160;&#160;&#160; &#160;&#160;&#160; {name:&#39;E&#39;,index:&#39;ener&#39;, width:55, editable:false}<br />&#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; ],<br />&#160;&#160;&#160; pager: jQuery(&#39;#pager3&#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 />&#160;&#160;&#160; sortname: &#39;NDB_No&#39;,<br />&#160;&#160;&#160; mtype: "POST", <br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; sortorder: "asc",<br />&#160;&#160;&#160; loadComplete: function(){<br />&#160;&#160;&#160; &#160;&#160;&#160; var ids = jQuery(&#39;#list3&#39;).getDataIDs();<br />&#160;&#160;&#160; &#160;&#160;&#160; for(var i=0;i&#60;ids.length;i++){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var cl = ids[i];&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; be = "&#60;input style=&#39;height:16px;width:16px;&#39; name=&#39;dd&#39; type=&#39;image&#39; SRC=&#39;&#60;?php echo "$mosConfig_live_site"; ?&#62;/images/dodatkowe/add.png&#39; onclick=&#39;add_prompt("+cl+");&#39; /&#62;"; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list3&#39;).setRowData(ids[i],{act:be});<br />&#160;&#160;&#160; &#160;&#160;&#160; }</p>
<p>&#160;&#160;&#160; },<br />&#160;&#160;&#160; onSelectRow: function(id){ <br />&#160;&#160;&#160; &#160;&#160;&#160; if(id &#38;&#38; id!==lastsel){ <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list3&#39;).restoreRow(lastsel3); <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list3&#39;).editRow(id,true);&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; lastsel3=id; <br />&#160;&#160;&#160; &#160;&#160;&#160; } <br />&#160;&#160;&#160; },&#160;&#160;&#160; <br />&#160;&#160;&#160; editurl: "&#60;?php echo "$mosConfig_live_site"; ?&#62;/components/com_tabs/tabela_dod.php",&#160;&#160;&#160; <br />&#160;&#160;&#160; caption: "Products"<br />}).navGrid(&#39;#pager3&#39;,{add:false,del:false,edit:false,position:&#39;right&#39;});<br />});</p>
<p>for now it should display the same data. I only want to see if it will show the second grid. Unfortunately it does not 🙁<br />It displays only one grid - if definition for the first grid is before the definition for 2nd it displays the first table and if definition for the 2nd grid is before the definition for 1st it displays the 2nd one.<br />Can you please tell me what am I missing?</p>
<p>Thx in advance</p>
]]></description>
        	        	<pubDate>Fri, 22 May 2009 08:46:58 +0300</pubDate>
        </item>
</channel>
</rss>