<?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: Grid as SubGrid Questions</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions</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/grid-as-subgrid-questions/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dmexis on Grid as SubGrid Questions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18252</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18252</guid>
        	        	<description><![CDATA[<p>Yeah... actually I did find a solution. I hope this will help you...!!! 😀</p>
</p>
<blockquote>
<p>jQuery().ready(function (){</p>
<p>jQuery("#list1").jqGrid({</p>
<p>colNames:[&#39;Username&#39;,&#39;Email&#39;, &#39;Rank&#39;, &#39;Status&#39;, &#39;Join Date&#39;, &#39;Login Date&#39;, &#39;Href&#39;],</p>
<p>colModel:[</p>
<p>{name:&#39;username&#39;,index:&#39;username&#39;, sorttype: &#39;text&#39;, width:90, editable:true},</p>
<p>{name:&#39;email&#39;, index:&#39;email&#39;, width:90, editable:true, editrules:{required: true, email: true}},</p>
<p>{name:&#39;rank&#39;,index:&#39;rank&#39;, width:90, editable:true, edittype: &#39;select&#39;, editoptions: { value: "admin:Admin; user:User" }, editrules:{required:true}},</p>
<p>{name:&#39;activate&#39;,index:&#39;activate&#39;, width:100, editable:true, edittype: &#39;checkbox&#39;, editoptions: { value: &#39;1:0&#39; }, editrules:{required:true}},</p>
<p>{name:&#39;join_date&#39;,index:&#39;join_date&#39;, width:80, editable:false, align:"right"},</p>
<p>{name:&#39;last_login_date&#39;,index:&#39;last_login_date&#39;, width:100, editable:false},</p>
<p>{name:&#39;href&#39;,index:&#39;href&#39;, hidden:true, editable:true, width:100}</p>
<p>],</p>
<p>datatype: &#39;local&#39;,</p>
<p>altRows: false,</p>
<p>autowidth: true,</p>
<p>height: 205,</p>
<p>scroll: false,</p>
<p>scrollrows: true,</p>
<p>rowNum:10,</p>
<p>pginput: false,</p>
<p>rowList: false,</p>
<p>pager: jQuery(&#39;#pager1&#39;),</p>
<p>sortname: &#39;db_address&#39;,</p>
<p>viewrecords: true,</p>
<p>loadonce: true,</p>
<p>forceFit: true,</p>
<p>loadui: &#39;block&#39;,</p>
<p>sortorder: "desc",</p>
<p>caption:"Users",</p>
<p>editurl:"include/jgrid_dummy.php",</p>
</p>
<p>//subgrid settings</p>
<p>subGrid: true,</p>
<p>subGridRowExpanded: function(subgrid_id, row_id) {</p>
<p>subgrid_table_id = subgrid_id + &#39;row_id&#39;;</p>
<p>subgrid_pager_id = subgrid_id + &#39;row_id&#39; + &#39;pager&#39;;</p>
</p>
<p>jQuery("#"+subgrid_id).html("&#60;table id=&#39;" + subgrid_table_id + "&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#60;div id=&#39;" + subgrid_pager_id + "&#39;&#62;&#60;/div&#62;");</p>
<p>jQuery("#"+subgrid_table_id).jqGrid({</p>
<p>datatype: &#39;local&#39;,</p>
<p>colNames: [&#39;Select&#39;,&#39;Insert&#39;,&#39;Update&#39;,&#39;Delete&#39;, &#39;Href&#39;],</p>
<p>colModel: [</p>
<p>{name:"select", index:"select", sortable: false, editable:true, width:20, align:"center", edittype: &#39;checkbox&#39;, editoptions: { value: &#39;1:0&#39; }},</p>
<p>{name:"insert", index:"insert", sortable: false, editable:true, width:20, align:"center", edittype: &#39;checkbox&#39;, editoptions: { value: &#39;1:0&#39; }},</p>
<p>{name:"update", index:"update", sortable: false, editable:true, width:20, align:"center", edittype: &#39;checkbox&#39;, editoptions: { value: &#39;1:0&#39; }},</p>
<p>{name:"delete_act", index:"delete_act", sortable: false, editable:true, width:20, align:"center", edittype: &#39;checkbox&#39;, editoptions: { value: &#39;1:0&#39; }},</p>
<p>{name:&#39;href&#39;,index:&#39;href&#39;, hidden:true, sortable: false, editable:true, width:100}</p>
<p>],</p>
<p>datatype: &#39;local&#39;,</p>
<p>altRows: false,</p>
<p>autowidth: true,</p>
<p>height: 25,</p>
<p>scroll: false,</p>
<p>scrollrows: true,</p>
<p>rowNum:10,</p>
<p>pginput: false,</p>
<p>rowList: false,</p>
<p>pager: jQuery(&#39;#&#39;+subgrid_pager_id),</p>
<p>sortname: &#39;db_address&#39;,</p>
<p>viewrecords: true,</p>
<p>loadonce: true,</p>
<p>forceFit: true,</p>
<p>loadui: &#39;block&#39;,</p>
<p>pgbuttons: false,</p>
<p>sortorder: "desc",</p>
<p>caption:"DB Permissions",</p>
<p>editurl:"include/jgrid_dummy.php"</p>
<p>});</p>
</p>
<p>FetchUserPerm(row_id, subgrid_table_id);</p>
</p>
<p>//pager2 (subgrid)</p>
<p>jQuery("#"+subgrid_table_id).jqGrid(&#39;navGrid&#39;,&#39;#&#39;+subgrid_pager_id,</p>
<p>{edit:true, add:false, del:false, refresh: false, search: false}, //options</p>
</p>
<p>{height:180,</p>
<p>reloadAfterSubmit:false,</p>
<p>closeAfterEdit: true,</p>
<p>checkOnUpdate: true,</p>
<p>checkOnSubmit: true,</p>
<p>beforeShowForm: function(form_id){</p>
<p>//$("#password").attr("size","40");</p>
<p>},</p>
<p>afterComplete: function(response, postdata, formid){</p>
<p>var su = jQuery("#list1").getGridParam("selrow");</p>
<p>SaveUserPerm(su, postdata);</p>
<p>}</p>
<p>} // edit options</p>
</p>
<p>);</p>
<p>}</p>
<p>});</p>
</blockquote>
]]></description>
        	        	<pubDate>Mon, 28 Jun 2010 18:24:38 +0300</pubDate>
        </item>
        <item>
        	<title>darcon3371 on Grid as SubGrid Questions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18250</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18250</guid>
        	        	<description><![CDATA[<p>I have the same problem.... did you found a solution ?</p>
]]></description>
        	        	<pubDate>Mon, 28 Jun 2010 17:45:45 +0300</pubDate>
        </item>
        <item>
        	<title>dmexis on Grid as SubGrid Questions</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18169</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-as-subgrid-questions#p18169</guid>
        	        	<description><![CDATA[<p>I have added a grid as a subgrid and put some data there too with no problem. My question is can I add a pager with buttons in that occasion? I am trying to do it but with no success!</p>
</p>
<blockquote>
<p>jQuery("#"+subgrid_id).html("&#60;table id=&#39;"+subgrid_table_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#60;div id=&#39;pager2&#39;&#62;&#60;/div&#62;");</p>
</blockquote>
<p>and then</p>
<blockquote>
<p>jQuery("#" + subgrid_table_id).jqGrid(&#39;navGrid&#39;,&#39;#pager2&#39;,</p>
<p>{edit:true, add:true, del:true, refresh: false, search: true},&#160;[..........]</p>
</blockquote>
<p>I copied pasted the navigation bar from my main grid and there works fine. But in the subgrid is not being displayed! Thanks in advance for your help&#8230;.!!!!</p>
</p>
<p>Edited: Just to be clearer... I added the pager: jQuery(&#39;#pager2&#39;) in the subgrid configuration and then the navigation bar was displayed but not the buttons (add, edit, delete etc).</p>
]]></description>
        	        	<pubDate>Fri, 25 Jun 2010 04:12:28 +0300</pubDate>
        </item>
</channel>
</rss>