<?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: Checking if a row is selected</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected</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/checking-if-a-row-is-selected/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>michaelg on Checking if a row is selected</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17561</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17561</guid>
        	        	<description><![CDATA[<p>Hi DaElectric,</p>
</p>
<p>Thanks for your reply and solution.&#160; Yep I have the row&#39;s ID, and would like to check if that row is selected, that will work for me.</p>
<p>Thats an interesting point you raised about there being 2 tables that have the same ID value for 2 rows.&#160; With your example ...</p>
<p>$("#tblselector).find("#+KeyValue").hasClass("ui-state-highlight")</p>
<p>... that shouldn&#39;t be a problem because your only searching in one of the 2 tables (#tblselector)</p>
</p>
<p>Cheers,</p>
<p>Michael</p>
]]></description>
        	        	<pubDate>Sat, 29 May 2010 08:03:41 +0300</pubDate>
        </item>
        <item>
        	<title>DaElectric on Checking if a row is selected</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17560</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17560</guid>
        	        	<description><![CDATA[<p>What information do you allready have about the row.</p>
<p>Do you have the row id? Or the value of the field that is marked as the key?</p>
<p>It creates the row as defined like this. Notice that the id of the row is the same as the key value.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8190' value='Select Code' data-codeid='sfcode8190' /></p>
<div class='sfcode' id='sfcode8190'>&#60;TR id=11 class=&#34;ui-widget-content jqgrow ui-row-ltr ui-state-highlight&#34; role=row aria-selected=true&#62;&#60;TD title=11 role=gridcell aria-describedby=list2_id&#62;11&#60;/TD&#62;&#60;TD title=2007-10-06 role=gridcell aria-describedby=list2_invdate&#62;2007-10-06&#60;/TD&#62;&#60;TD title=&#34;Client 1&#34; role=gridcell aria-describedby=list2_name&#62;Client 1&#60;/TD&#62;&#60;TD style=&#34;TEXT-ALIGN: right&#34; title=600.00 role=gridcell aria-describedby=list2_amount&#62;600.00&#60;/TD&#62;&#60;TD style=&#34;TEXT-ALIGN: right&#34; title=120.00 role=gridcell aria-describedby=list2_tax&#62;120.00&#60;/TD&#62;&#60;TD style=&#34;TEXT-ALIGN: right&#34; title=720.00 role=gridcell aria-describedby=list2_total&#62;720.00&#60;/TD&#62;&#60;TD title=&#34;&#34; role=gridcell aria-describedby=list2_note&#62;&#38;nbsp;&#60;/TD&#62;&#60;/TR&#62;</div>
</p>
<p>So then you could just do.</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5637' value='Select Code' data-codeid='sfcode5637' /></p>
<div class='sfcode' id='sfcode5637'>$(&#34;#tblselector).find(&#34;#+KeyValue&#34;).hasClass(&#34;ui-state-highlight&#34;)</div>
<p>This would return tru if it was selected and false if it were not selected.</p>
</p>
<p>This leads me to an intresting issue of having multiple grids on the same form that have rows that happen to have the same key value.</p>
<p>Becuase my tables use an autogenerated id field for thier primary key it is possible that if I put 2 grids on the same page that I could possibly wind up with 2 elements on the same page with the same id. This would be disasterous if I were looking for the rows just by the id&#39;s.</p>
]]></description>
        	        	<pubDate>Sat, 29 May 2010 07:38:08 +0300</pubDate>
        </item>
        <item>
        	<title>michaelg on Checking if a row is selected</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17559</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/checking-if-a-row-is-selected#p17559</guid>
        	        	<description><![CDATA[<p>Hi there,</p>
<p>Quick question - when multiselect is turned on, is there a way to check if a row is selected or not other than looping through the selarrrow aray?&#160; I am wondering this because it seems that performance would be better if you didn&#39;t have to loop through the array.</p>
<p>Thanks,</p>
<p>Michael</p>
]]></description>
        	        	<pubDate>Sat, 29 May 2010 06:19:19 +0300</pubDate>
        </item>
</channel>
</rss>