<?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: Maintain row selection when changing page</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-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/discussion/maintain-row-selection-when-changing-page/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5308</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5308</guid>
        	        	<description><![CDATA[<p>Ok, its all working now. For those interested I posted the code on pastebin. You&#39;ll need the jquery cookie plugin:</p>
<p>Maintain selection changing pages:<br /><a href="http://pastebin.com/f778c1db" rel="nofollow" target="_blank">http://pastebin.com/f778c1db</a> *UPDATED*</p>
<p>Little hack to the multiselect function. starts on line 1276 of grid.base.js (hope this gets included in future releases):</p>
<p><a href="http://pastebin.com/f3ca5cfd6" rel="nofollow" target="_blank">http://pastebin.com/f3ca5cfd6</a></p>
<p>I&#39;m not really a javascript programmer, so any improvements are welcome. Please post them here.</p>
<p>Thanks to tony for all his support.</p></p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 18:32:33 +0200</pubDate>
        </item>
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5293</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5293</guid>
        	        	<description><![CDATA[<p>Ok, i hacked a line in grid.base.js and had the result i wanted:</p>
<p>After line 1296, i added:</p>
<p>ts.p.selarrrow[i]= ts.p.selrow = this.id;</p>
<p>And on line 1299, I commented:</p>
<p>ts.p.selarrrow = []; ts.p.selrow = null;</p>
<p>This way, the event onSelectAll has the same behaviour as onSelectRow.</p>
</p>
<p>If this doesnt break anything,&#160; I would like to resquest that it would be implemented in a future release.</p>
<p>As soon as it&#39;s ready, I will post the final code to maintain row selection when changing page.</p>
<p>EDIT:</p>
<p>Just realized it breaks getGridParam(&#39;selarrrow&#39;), going to insert those results in a seperate array to return them.</p>
<p>Thanks for the help,</p>
<p>Frederico</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 12:40:06 +0200</pubDate>
        </item>
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5286</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5286</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>Thanks for the fast reply.</p>
<p>That argument sure helps, but when I click on the top checkbox (the one that selects all the rows in that page) it doesnt call the onSelectRow event, instead, it calls the onSelectAll event. Is there a way to call the onSelectRow event anyway for each item when clicking this checkbox?</p>
<p>Edit:</p>
<p>I realised that onSelectAll also has that second argument, but it doesnt return the id&#39;s when deselected like onSelectRow.</p>
<p>Thanks,</p>
<p>Frederico</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 12:11:03 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5270</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5270</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Sorry for this, but there is undocumented parameter in onSelectRow -</p>
<p>onSelectRow(rowid, selected) - where the selected is valid only in multiselect mode and is true when the row is selected and false if delselected.</p>
<p>But as for the news you can read in the docs-</p>
<ul>
<li> Added a second parameter to <em>setSelection</em>: onselectrow (boolean, default true). If set to false, the onSelectRow is not launched </li>
</ul>
<p>Hope this helps</p>
<p>Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 11:05:45 +0200</pubDate>
        </item>
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5264</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p5264</guid>
        	        	<description><![CDATA[<p>Hello again,</p>
<p>I tried doing this with the onSelectRow event and it works, the problem is i use the multiselect option that uses the onSelectAll event.</p>
<p>Unlike onSelectRow, that always returns the id weither you are selecting or deselecting, onSelectAll only returns the id&#39;s that you select. This is a problem because i can add the selected row&#39;s id to a cookie, but cannot remove them because i dont know which were removed.</p>
<p>Another problem is when i call the setSelection function to reselect the rows on page change, it calls the onSelectRow event, and because i&#39;m using a code that works like toggle to add and remove id&#39;s from the cookie (if it exists removes it, else it adds it) it removes all of the selected id&#39;s.</p>
<p>I hope i made myself clear, here&#39;s the code i use so someone can take a look:</p>
<p><a href="http://pastebin.com/m665ae618" rel="nofollow" target="_blank">http://pastebin.com/m665ae618</a></p>
<p>Please ignore the messy code, its just a prototype.</p>
<p>Thanks,</p>
<p>Frederico</p>
]]></description>
        	        	<pubDate>Thu, 12 Mar 2009 10:21:48 +0200</pubDate>
        </item>
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2770</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2770</guid>
        	        	<description><![CDATA[<p>Thanks for the suggestions, I have some ideas how to do this, when i&#39;m done i&#39;ll post here.</p>
]]></description>
        	        	<pubDate>Wed, 29 Oct 2008 06:16:49 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2761</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2761</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Or simply use onPaging event to store selected Ids</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 29 Oct 2008 03:34:19 +0200</pubDate>
        </item>
        <item>
        	<title>YamilBracho on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2710</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2710</guid>
        	        	<description><![CDATA[<p>I think you can do this by using some client persitence strategy like cookies..</p>
]]></description>
        	        	<pubDate>Mon, 27 Oct 2008 08:13:56 +0200</pubDate>
        </item>
        <item>
        	<title>Armorfist on Maintain row selection when changing page</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2697</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/maintain-row-selection-when-changing-page#p2697</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Is it possible to maintain row selection when changing page with the pager?</p>
<p>On the example "SelectAll event" under "New in version 3.2", if i select all elements from page 1, and move to page 2, the items on page 1 become deselected.</p>
<p>Thanks!</p>
]]></description>
        	        	<pubDate>Sat, 25 Oct 2008 08:32:01 +0300</pubDate>
        </item>
</channel>
</rss>