<?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: Saving collapsed rows when grouping</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/saving-collapsed-rows-when-grouping</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/saving-collapsed-rows-when-grouping/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>henryk on Saving collapsed rows when grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saving-collapsed-rows-when-grouping#p21863</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saving-collapsed-rows-when-grouping#p21863</guid>
        	        	<description><![CDATA[<p>Actually I wish I named this thread more clearly: "Saving collapsed state of groupings on grid refresh"</p>
]]></description>
        	        	<pubDate>Fri, 28 Jan 2011 09:12:29 +0200</pubDate>
        </item>
        <item>
        	<title>henryk on Saving collapsed rows when grouping</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/saving-collapsed-rows-when-grouping#p21857</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/saving-collapsed-rows-when-grouping#p21857</guid>
        	        	<description><![CDATA[<p>Hey,</p>
</p>
<p>My firm loves using this product and we just ran into a blocker issue. It seems that when we use grouping we can&#39;t collapse. And this issue is becuase we refresh teh grid every 100ms since we use cometd/web sockets to update the grid while data comes in throughout the day. With furthur investigation I found that it does collapse BUT everything becomes uncollapsed after the grid is refreshed. So if we refresh every 100ms it seems like no collapse happens. What I did as a bad solution which doesnt work well is to save everything that is hidden, refresh, then hide the rows I stored. Here is my bad solution, maybe there is a better one:</p>
</p>
<p>&#160;&#160;&#160; var refreshGrid = function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; storeHiddenRows();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; theGrid.trigger(&#39;reloadGrid&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; hideRows();<br />&#160;&#160;&#160; };</p>
<p>&#160;&#160;&#160; var storeHiddenRows = function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; theHiddenRows = [];<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.each(theReceivedTimes, function(key, value) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if ($(&#39;#&#39; + key).is(&#39;:hidden&#39;)) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; theHiddenRows.push(key)<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; };</p>
<p>&#160;&#160;&#160; var hideRows = function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.each(theHiddenRows, function(anIndex, anId) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;#&#39; + anId).css({ display: &#39;none&#39; });<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; });<br />&#160;&#160;&#160; }</p>
</p>
<p>Thanks again! Use this plugin everyday!</p>
]]></description>
        	        	<pubDate>Thu, 27 Jan 2011 23:21:13 +0200</pubDate>
        </item>
</channel>
</rss>