<?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: Get Column Value on click of the + button for SubGrid expansion </title>
	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-value-on-click-of-the-button-for-subgrid-expansion</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/get-column-value-on-click-of-the-button-for-subgrid-expansion/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>yashmangupta on Get Column Value on click of the + button for SubGrid expansion </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-value-on-click-of-the-button-for-subgrid-expansion#p26025</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-column-value-on-click-of-the-button-for-subgrid-expansion#p26025</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>Just to update that I am able to get the column value (refere below in bold)&#160;but now the new issue has surfaced. The value captured in intVenID is now passed to the subgrid URL (see below in red) and subgrid is shown empty.</p>
<p>Anyone has any idea what is going wrong.</p>
</p>
<p>subGridRowExpanded: function(subgrid_id, row_id)</p>
<p>{</p>
<p>var subgrid_table_id, pager_id;</p>
<p>subgrid_table_id = subgrid_id+"_t";</p>
<p>pager_id = "p_"+subgrid_table_id;</p>
</p>
<p><strong>var intVenID = jQuery(&#39;#list&#39;).jqGrid(&#39;getCell&#39;, row_id, 2);</strong></p>
</p>
<p>$("#"+subgrid_id).html("&#60;table id=&#39;"+subgrid_table_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#60;div id=&#39;"+pager_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/div&#62;");</p>
<p>jQuery("#"+subgrid_table_id).jqGrid({</p>
<p><strong><span style="color: #ff0000;">url:"venue_list_floors.asp?q=2&#38;venid="+ intVenID,</span></strong></p>
<p>datatype: "xml",</p>
<p>colNames: [&#39;Floor ID&#39;,&#39;Floor Name&#39;, &#39;File/Image&#39;, &#39;Navigate&#39;],</p>
<p>colModel: [</p>
<p>{name:"PK_VenueFloorID",index:"PK_VenueFloorID", width:50, key:true, align:"center", hidden:false, sortable:true},</p>
<p>{name:"VenueFloorName",index:"VenueFloorName", width:100, key:false, align:"left", sortable:true},</p>
<p>{name:"FileImage",index:"FileImage", width:100, key:false, align:"center", sortable:false},</p>
<p>{name:"SubRowNavig",index:"SubRowNavig", width:60, key:false, align:"center", sortable:false}</p>
<p>],</p>
]]></description>
        	        	<pubDate>Tue, 28 Feb 2012 14:03:14 +0200</pubDate>
        </item>
        <item>
        	<title>yashmangupta on Get Column Value on click of the + button for SubGrid expansion </title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/get-column-value-on-click-of-the-button-for-subgrid-expansion#p26024</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/get-column-value-on-click-of-the-button-for-subgrid-expansion#p26024</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I am having tough time in getting the column value while I click on the + button of the main grid to show the subgrid. This column value will be passed as a parameter to subgrid (see below in bold)</p>
<p>Below is the code</p>
<p>&#60;script type="text/javascript"&#62;</p>
<p>//&#60;![CDATA[</p>
<p>$(function(){</p>
<p>$("#list").jqGrid({</p>
<p>url:"venue_listings.asp",</p>
<p>datatype: &#39;xml&#39;,</p>
<p>mtype: &#39;POST&#39;,</p>
<p>colNames:[&#39;Venue ID&#39;, &#39;Navigate&#39;, &#39;Record Date &#38; Time&#39;, &#39;Venue Name&#39;, &#39;Venue Address&#39;, &#39;Has Floors&#39;],</p>
<p>colModel :[</p>
<p>{name:&#39;PK_VenueID&#39;, index:&#39;PK_VenueID&#39;, width: 55, sortable:false, align:&#39;center&#39;, hidden:false, sortable: true},</p>
<p>{name:&#39;RowNavig&#39;, index:&#39;RowNavig&#39;, width:140, sortable:false, align:&#39;center&#39;, hidden:false, sortable: false},</p>
<p>{name:&#39;RecordAddDateTime&#39;, index:&#39;RecordAddDateTime&#39;, width:150, sortable:false, align:&#39;center&#39;, hidden:false, sortable: true},</p>
<p>{name:&#39;VenueName&#39;, index:&#39;VenueName&#39;, width:250, sortable:true, align:&#39;left&#39;, hidden:false, sortable: true},</p>
<p>{name:&#39;VenueAddress&#39;, index:&#39;VenueAddress&#39;, width:265, align:&#39;left&#39;, hidden:false, sortable: true},</p>
<p>{name:&#39;HasFloors&#39;, index:&#39;HasFloors&#39;, width:80, align:&#39;center&#39;, hidden:false, sortable: true}</p>
<p>],</p>
<p>rowNum:50,</p>
<p>rowList:[10,20,30,50,100],</p>
<p>pager: &#39;#pager&#39;,</p>
<p>sortname: &#39;PK_VenueID&#39;,</p>
<p>sortorder: &#39;asc&#39;,</p>
<p>viewrecords: true,</p>
<p>rownumbers: true,</p>
<p>ignoreCase: true,</p>
<p>subGrid: true,</p>
<p>gridview: true,</p>
<p>caption: &#39;BELOW LIST SHOWS ALL THE VENUES WHICH ARE LISTED CURRENTLY IN THE DATABASE&#39;,</p>
<p>multiselect: false,</p>
<p>autowidth: true,</p>
<p>shrinkToFit: false,</p>
<p>height: 450,</p>
</p>
<p>subGridRowExpanded: function(subgrid_id, row_id)</p>
<p>{</p>
<p>// we pass two parameters</p>
<p>// subgrid_id is a id of the div tag created whitin a table data</p>
<p>// the id of this elemenet is a combination of the "sg_" + id of the row</p>
<p>// the row_id is the id of the row</p>
<p>// If we wan to pass additinal parameters to the url we can use</p>
<p>// a method getRowData(row_id) &#8211; which returns associative array in type name-value</p>
<p>// here we can easy construct the flowing</p>
<p>var subgrid_table_id, pager_id;</p>
<p>subgrid_table_id = subgrid_id+"_t";</p>
<p>pager_id = "p_"+subgrid_table_id;</p>
</p>
<p>$("#"+subgrid_id).html("&#60;table id=&#39;"+subgrid_table_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/table&#62;&#60;div id=&#39;"+pager_id+"&#39; class=&#39;scroll&#39;&#62;&#60;/div&#62;");</p>
<p>jQuery("#"+subgrid_table_id).jqGrid({</p>
<p>url:"venue_list_floors.asp?q=2&#38;venid"+ <strong>row_id,</strong></p>
</p>
<p>datatype: "xml",</p>
<p>colNames: [&#39;Floor ID&#39;,&#39;Floor Name&#39;, &#39;File/Image&#39;, &#39;Navigate&#39;],</p>
<p>colModel: [</p>
<p>{name:"PK_VenueFloorID",index:"PK_VenueFloorID", width:50, key:true, align:"center", hidden:false, sortable:true},</p>
<p>{name:"VenueFloorName",index:"VenueFloorName", width:100, key:false, align:"left", sortable:true},</p>
<p>{name:"FileImage",index:"FileImage", width:100, key:false, align:"center", sortable:false},</p>
<p>{name:"SubRowNavig",index:"SubRowNavig", width:60, key:false, align:"center", sortable:false}</p>
<p>],</p>
<p>rowNum:50,</p>
<p>pager: pager_id,</p>
<p>rownumbers: true,</p>
<p>sortname: &#39;PK_VenueFloorID&#39;,</p>
<p>sortorder: "asc",</p>
<p>autowidth: true,</p>
<p>height: &#39;100%&#39;</p>
<p>});</p>
<p>jQuery("#"+subgrid_table_id).jqGrid(&#39;navGrid&#39;,"#"+pager_id,{edit:false,add:false,del:false, search:false, refresh:true});</p>
<p>},</p>
</p>
<p>subGridRowColapsed: function(subgrid_id, row_id)</p>
<p>{</p>
<p>// this function is called before removing the data</p>
<p>var subgrid_table_id;</p>
<p>subgrid_table_id = subgrid_id+"_t";</p>
<p>jQuery("#"+subgrid_table_id).remove();</p>
<p>},</p>
</p>
<p>}).navGrid(&#39;#pager&#39;,{edit:false, add:false, del:false, search:false, refresh:true});</p>
</p>
<p>});</p>
</p>
<p>//]]&#62;</p>
<p>&#60;/script&#62;</p>
]]></description>
        	        	<pubDate>Tue, 28 Feb 2012 13:13:11 +0200</pubDate>
        </item>
</channel>
</rss>