<?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: Set selection when data loaded</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded</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/set-selection-when-data-loaded/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12663</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12663</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You can try to use afterInsertRow - where you can set the selection.</p>
<p>Note that in this case gridview mode should be false.</p>
<p>Please let me know if this is faster.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 02 Dec 2009 16:58:07 +0200</pubDate>
        </item>
        <item>
        	<title>bernie.blakeney on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12659</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12659</guid>
        	        	<description><![CDATA[<p>Thanks Tony.</p>
<p>I don&#39;t have that much data - about 500 rows. Firefox gives me that "a script is running slowly" message after only about 120 records.</p>
<p>It would be really great if in the data I&#39;m returning I could add an attribute to the row element that jqgrid would use to select the row - something like "&#60;row id=&#39;1234&#39; selected=&#39;Y&#39;&#62;". Then jqgrid could set the value when painting the grid which I assume would be much faster.</p>
<p>Bernie</p>
]]></description>
        	        	<pubDate>Wed, 02 Dec 2009 16:23:51 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12577</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12577</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It depends how many data you loop.</p>
</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 30 Nov 2009 12:49:47 +0200</pubDate>
        </item>
        <item>
        	<title>bernie.blakeney on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12532</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12532</guid>
        	        	<description><![CDATA[<p>Thanks Rumen,</p>
<p>I&#39;ve tried something like that but it is dreadfully slow.&#160; Here&#39;s the code, maybe I&#39;m doing something wrong.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7004' value='Select Code' data-codeid='sfcode7004' /></p>
<div class='sfcode' id='sfcode7004'>gridComplete: function()<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var uData = jQuery(&#39;#list&#39;).getGridParam(&#39;userData&#39;);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var id_arr=uData.selected.split(",");</p>
<p>&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; for (var i=0;i&#60;=id_arr.length;i++)<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; {<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(&#39;#list&#39;).setSelection(id_arr[i],false);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }</p>
</div>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 11:49:10 +0200</pubDate>
        </item>
        <item>
        	<title>Rumen[Trirand] on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12531</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12531</guid>
        	        	<description><![CDATA[<p>One way to do it is to pass the selected rows as a javascript array, and then hook the gridComplete event, where you can set selected rows based on the values in the array, e.g. something along the lines of</p>
</p>
<p>jQuery(&#39;#JQGridID&#39;).setGridParam( {gridComplete: function()&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;{ &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;var grid = jQuery(&#39;#JQGridID&#39;);</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;grid.setSelection(selectedRowArray[0],false);</p>
<p>&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;}});</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 11:32:05 +0200</pubDate>
        </item>
        <item>
        	<title>bernie.blakeney on Set selection when data loaded</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12528</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/set-selection-when-data-loaded#p12528</guid>
        	        	<description><![CDATA[<p>Is there anyway to return the selection state with my data set so that rows will be selected based on data in my db? I save the selected state of each row into a database so the user can re-use a selection but I can&#39;t figure out an effiecient way to set the selection from the query.</p>
</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Fri, 27 Nov 2009 10:16:43 +0200</pubDate>
        </item>
</channel>
</rss>