<?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: &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem</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/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Adriien M on &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29993</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29993</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>Finally I use this solution, I stop the execution, collapse all rows and open manually the row stocked in &#39;subgridRow&#39;&#160;:</p>
<blockquote>
<p>subGridBeforeExpand: function (subgridDivId, rowid) {</p>
<p style="padding-left: 30px;">if (rowid != subgridRow) {</p>
<p style="padding-left: 60px;"><span style="white-space:pre"> </span>var grid = $(this);</p>
<p style="padding-left: 60px;"><span style="white-space:pre"> </span>var rows = grid.jqGrid("getDataIDs");</p>
<p style="padding-left: 60px;"><span style="white-space:pre"> </span>$.each(rows, function(index, rowId) {</p>
<p style="padding-left: 90px;"><span style="white-space:pre"> </span>grid.collapseSubGridRow(rowId);</p>
<p style="padding-left: 90px;"><span style="white-space:pre"> </span>if (index + 1 == rows.length) {</p>
<p style="padding-left: 120px;"><span style="white-space:pre"> </span>subgridRow = rowid;</p>
<p style="padding-left: 120px;"><span style="white-space:pre"> </span>grid.expandSubGridRow(rowid);</p>
<p style="padding-left: 90px;"><span style="white-space:pre"> </span>}</p>
<p style="padding-left: 60px;"><span style="white-space:pre"> </span>});</p>
<p style="padding-left: 60px;"><span style="white-space:pre"> </span>return false;</p>
<p style="padding-left: 30px;"><span style="white-space:pre"> </span>}</p>
</p>
<p style="padding-left: 30px;"><span style="white-space:pre"> </span>return true;</p>
<p>}</p>
</p>
</blockquote>
<p>I submit the solution, maybe it will be useful for someone else. <img class="spSmiley" style="margin:0" title="Laugh" src="/blog/wp-content/forum-smileys/sf-laugh.gif" alt="Laugh" /></p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 17 Dec 2013 14:38:00 +0200</pubDate>
        </item>
        <item>
        	<title>tony on &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29990</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29990</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I suppose you will maybe to use setTimeout in order to process the operatins correct.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Tue, 17 Dec 2013 12:41:15 +0200</pubDate>
        </item>
        <item>
        	<title>Adriien M on &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29976</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29976</guid>
        	        	<description><![CDATA[<p>Up! <img class="spSmiley" style="margin:0" title="Laugh" src="/blog/wp-content/forum-smileys/sf-laugh.gif" alt="Laugh" /></p>
]]></description>
        	        	<pubDate>Mon, 16 Dec 2013 12:40:26 +0200</pubDate>
        </item>
        <item>
        	<title>Adriien M on &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29895</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29895</guid>
        	        	<description><![CDATA[<p>Nobody?</p>
]]></description>
        	        	<pubDate>Wed, 27 Nov 2013 10:17:17 +0200</pubDate>
        </item>
        <item>
        	<title>Adriien M on &#091;Subgrid&#093; Collapse all rows before expand a new one = problem</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29884</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/subgrid-collapse-all-rows-before-expand-a-new-one-problem#p29884</guid>
        	        	<description><![CDATA[</p>
<p>Hello,</p>
</p>
<p>I&#39;ve got a problem when I collapse all rows before expand a new one, the rowid in subGridRowExpanded is wrong.</p>
<p>Here is my code snippet :</p>
<blockquote>
<p>subGridBeforeExpand: function (subgridDivId, rowid) {</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>console.log("subGridBeforeExpand " +&#160;rowid);</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>var rowIds = $("#grilleCompteTiers").getDataIDs();</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>$.each(rowIds, function (index, rowId) {</p>
<p style="padding-left: 60px;"><span style="white-space: pre;"> </span>$("#grilleCompteTiers").collapseSubGridRow(rowId);</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>});</p>
<p>},</p>
<p>subGridOptions: { selectOnExpand : true },</p>
<p>subGridRowExpanded: function (subgridDivId, rowid) {</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>console.log("subGridRowExpanded " +&#160;rowid);</p>
<p style="padding-left: 30px;"><span style="white-space: pre;"> </span>&#8230;</p>
<p>}</p>
</blockquote>
<p>And here is the output :</p>
<blockquote>
<div class="console-message console-log-level">subGridBeforeExpand 13722 &#60;- First open</div>
<div class="console-message console-log-level">subGridRowExpanded 13722</div>
<div class="console-message console-log-level">subGridBeforeExpand 13723 &#60;- Second open</div>
<div class="console-message console-log-level">subGridRowExpanded <span style="color: #ff0000;">13722 </span>&#60;- Wrong id caused by collapseSubGridRow</div>
</blockquote>
<p>I haven&#39;t got this issue on the previous&#160;version, I don&#39;t really know if it&#39;s a bug but I think it would be awesome to add a boolean option "collapseAllOnExpand" in subGridOptions.</p>
<p>What do you think?</p>
</p>
<p>Best regards</p>
]]></description>
        	        	<pubDate>Mon, 25 Nov 2013 17:34:29 +0200</pubDate>
        </item>
</channel>
</rss>