<?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: Select first row of a grid</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid</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/select-first-row-of-a-grid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15096</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15096</guid>
        	        	<description><![CDATA[<p>Sorry, forget the point, I have a stange side effect whith my own javascript... I had a condition in order to make the selection of the first row only on the page load (not on grid reload), but when I remove this condition, everything works fine...</p>
<p>Strange, but I don&#39;t have many time to investigate... So it&#39;s okay like that.</p>
]]></description>
        	        	<pubDate>Tue, 23 Feb 2010 15:18:01 +0200</pubDate>
        </item>
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15094</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15094</guid>
        	        	<description><![CDATA[<p>I tried something else : I added a custuml button on my grid that calls your script :</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9041' value='Select Code' data-codeid='sfcode9041' /></p>
<div class='sfcode' id='sfcode9041'>console.log($(&#34;tr:first&#34;,&#34;#mygrid&#34;))</div>
</p>
<p>In this case, <span style="text-decoration: underline;">the result is OK in the console</span> !</p>
<p>Is it possible that when the <span style="text-decoration: underline;">gridComplete</span> is fired, the rows are not in the table yet ??</p>
<p>I tried with :</p>
<ul>
<li>jqGrid 3.6.3 / 3.6.4 : same problem</li>
<li>jQuery 1.3.2 / 1.4.1 : same problem</li>
</ul>
]]></description>
        	        	<pubDate>Tue, 23 Feb 2010 12:42:52 +0200</pubDate>
        </item>
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15093</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15093</guid>
        	        	<description><![CDATA[<p>I tried with the tr selector but the result shows nothing :</p>
<p><a href="http://img5.hostingpics.net/pics/548785Capture_tr.jpg"><img src="http://img5.hostingpics.net/pics/548785Capture_tr.jpg" width="100"  class="sfimageleft spUserImage" alt="With TR selector" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
</p>
<p>But it seems ok with the tbody selector $("tbody:first","#mygrid") :</p>
<p><a href="http://img5.hostingpics.net/pics/849755Capture_tbody.jpg"><img src="http://img5.hostingpics.net/pics/849755Capture_tbody.jpg" width="100"  class="sfimageleft spUserImage" alt="With TBODY selector" /><img src="http://www.trirand.com/blog/wp-content/sp-resources/forum-themes/default/images/sp_Mouse.png" class="sfimageleft sfmouseleft" alt="Image Enlarger" /></a></p>
<p>But I don&#39;t undestand why I have this result in the first case ?!</p>
<p>Thanks&#8230;</p>
]]></description>
        	        	<pubDate>Tue, 23 Feb 2010 12:30:53 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15088</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15088</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>in firefox do</p>
<p>var test1&#160; = $("tr:first","#mygrid")</p>
<p>console.log(test1);</p>
<p>and so on -</p>
</p>
<p>see what is happen in the console tab</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 23 Feb 2010 11:56:21 +0200</pubDate>
        </item>
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15070</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p15070</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>It seems that this solution doesn&#39;t work anymore. I upgraded each version up to 3.6.4, but I didn&#39;t notice when this occured. The returned id is always null (the row is not found).</p>
<p>I&#39;m not a jQuery expert... I tried these :</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit486' value='Select Code' data-codeid='sfcode486' /></p>
<div class='sfcode' id='sfcode486'>$(&#34;tr:first&#34;, &#34;tbody:first&#34;, &#34;#mygrid&#34;).attr(&#39;id&#39;);</div>
<p><input type='button' class='sfcodeselect' name='sfselectit2347' value='Select Code' data-codeid='sfcode2347' /></p>
<div class='sfcode' id='sfcode2347'>$(&#34;#mygrid tbody:first tr:first&#34;).attr(&#39;id&#39;);</div>
<p><input type='button' class='sfcodeselect' name='sfselectit9335' value='Select Code' data-codeid='sfcode9335' /></p>
<div class='sfcode' id='sfcode9335'>$(&#34;#mygrid &#62; tbody:first &#62; tr:first&#34;).attr(&#39;id&#39;);</div>
</p>
<p>But none worked.</p>
<p>Any idea ?</p>
<p>Regards.</p>
]]></description>
        	        	<pubDate>Tue, 23 Feb 2010 11:00:23 +0200</pubDate>
        </item>
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10727</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10727</guid>
        	        	<description><![CDATA[<p>Thanks a lot : it was so simple...</p>
]]></description>
        	        	<pubDate>Thu, 15 Oct 2009 02:15:55 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10717</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10717</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I do not think that loadComplete is a good choice. Better you can&#160; use gridComplete and then</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2846' value='Select Code' data-codeid='sfcode2846' /></p>
<div class='sfcode' id='sfcode2846'>
<p>gridComplete: function () {</p>
<p>var firstid = $("tr:first","#mygrid").attr("id");</p>
<p>$("#mygrid").setSelection(firstid);</p>
<p>}</p>
</div>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 14 Oct 2009 12:40:39 +0300</pubDate>
        </item>
        <item>
        	<title>glemarie on Select first row of a grid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10695</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/select-first-row-of-a-grid#p10695</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I&#39;d like to select the first row of a grid on loadComplete. I don&#39;t know the rowid.</p>
<p>How can I do this ? Is there a way to get the rowid of the first row and then use setSelection ?</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Wed, 14 Oct 2009 08:08:44 +0300</pubDate>
        </item>
</channel>
</rss>