<?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: When grid loads, I want the row highlighted.</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted</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/when-grid-loads-i-want-the-row-highlighted/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>wyattbiker on When grid loads, I want the row highlighted.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24076</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24076</guid>
        	        	<description><![CDATA[<p>Thanks for that reply dude... It made me think and realize what I was doing wrong. I had my &#160;<strong>gridComplete:</strong> event like this:</p>
<p><strong>&#160;</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit831' value='Select Code' data-codeid='sfcode831' /></p>
<div class='sfcode' id='sfcode831'>gridComplete: gridXComplete(),</div>
</p>
<p>I had to changed it to this. and everything works now.</p>
<p><strong>&#160;</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit330' value='Select Code' data-codeid='sfcode330' /></p>
<div class='sfcode' id='sfcode330'>
<p><strong></strong><strong>gridComplete: function () {</strong></p>
<p><strong></strong></p>
<p><strong>&#160; gridXComplete();&#160;</strong></p>
<p><strong>},</strong></p>
</p>
<p>/// Here is the start of the function....</p>
<p><strong>function gridXComplete(){</strong></p>
<p><strong>&#160; &#160; selRow=$(&#39;#list&#39;).getDataIDs()[0];</strong></p>
<p><strong>&#160; &#160; $(&#39;#list&#39;).setSelection(selRow, true);</strong></p>
<p><strong>&#160; &#160; /// other code here......</strong></p>
<p><strong>}</strong></p>
</p>
</div>
<p>I guess you cannot call a function directly as parameter and need to enclose it inside function(). Not sure why but it works.</p>
]]></description>
        	        	<pubDate>Thu, 28 Jul 2011 04:19:09 +0300</pubDate>
        </item>
        <item>
        	<title>wyattbiker on When grid loads, I want the row highlighted.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24075</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24075</guid>
        	        	<description><![CDATA[<p>Thanks for that reply dude... It made me think and realize what I was doing wrong. I had my &#160;<strong>gridComplete:</strong> event like this:</p>
<p><strong>&#160;</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit141' value='Select Code' data-codeid='sfcode141' /></p>
<div class='sfcode' id='sfcode141'>gridComplete: gridXComplete(),</div>
</p>
<p>I had to changed it to this. and everything works now.</p>
<p><strong>&#160;</strong></p>
<p><input type='button' class='sfcodeselect' name='sfselectit6630' value='Select Code' data-codeid='sfcode6630' /></p>
<div class='sfcode' id='sfcode6630'>
<p><strong></strong><strong>gridComplete: function () {</strong></p>
<p><strong></strong></p>
<p><strong>&#160; gridXComplete();&#160;</strong></p>
<p><strong>},</strong></p>
</p>
<p>/// Here is the start of the function....</p>
<p><strong>function gridXComplete(){</strong></p>
<p><strong>&#160; &#160; selRow=$(&#39;#list&#39;).getDataIDs()[0];</strong></p>
<p><strong>&#160; &#160; $(&#39;#list&#39;).setSelection(selRow, true);</strong></p>
<p><strong>&#160; &#160; /// other code here......</strong></p>
<p><strong>}</strong></p>
</p>
</div>
<p>I guess you cannot call a function directly as parameter and need to enclose it inside function(). Not sure why but it works.</p>
]]></description>
        	        	<pubDate>Thu, 28 Jul 2011 04:19:08 +0300</pubDate>
        </item>
        <item>
        	<title>Rakeka on When grid loads, I want the row highlighted.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24071</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24071</guid>
        	        	<description><![CDATA[<p>Have you tried the loadComplete event?</p>
</p>
<p>Something like this:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5078' value='Select Code' data-codeid='sfcode5078' /></p>
<div class='sfcode' id='sfcode5078'>
<p>$(&#39;#gridID&#39;).jqGrid<br />({</p>
<p>/* other options ... */</p>
<p>loadComplete:<br />function()<br />{<br />&#160;&#160; &#160;$(&#39;#gridID&#39;).setSelection($(&#39;#gridID&#39;).getDataIDs()[0], true);<br />}</p>
<p>});</p>
</div>
<p>It will select the first row even when you change pages.</p>
]]></description>
        	        	<pubDate>Wed, 27 Jul 2011 06:04:24 +0300</pubDate>
        </item>
        <item>
        	<title>wyattbiker on When grid loads, I want the row highlighted.</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24070</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/when-grid-loads-i-want-the-row-highlighted#p24070</guid>
        	        	<description><![CDATA[<p>When the grid loads, I would like a selected row to be highlighted as if it were clicked. I tried several things using setSelection but although it positions, it doesnt highlight. Also same thing when first loading the grid. The first row doesnt get selected.</p>
</p>
<p>Is there some trick to this?</p>
<p>I am using jquery.jqGrid-4.1.1</p>
</p>
<p>Thanks</p>
]]></description>
        	        	<pubDate>Wed, 27 Jul 2011 00:57:30 +0300</pubDate>
        </item>
</channel>
</rss>