<?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: I now receive eData when alerting after executing delGridRow.  Why?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/i-now-receive-edata-when-alerting-after-executing-delgridrow-why</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/i-now-receive-edata-when-alerting-after-executing-delgridrow-why/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>dottedquad on I now receive eData when alerting after executing delGridRow.  Why?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/i-now-receive-edata-when-alerting-after-executing-delgridrow-why#p22974</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/i-now-receive-edata-when-alerting-after-executing-delgridrow-why#p22974</guid>
        	        	<description><![CDATA[<p>Hello all,</p>
<p>jqgrid snippet:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4326' value='Select Code' data-codeid='sfcode4326' /></p>
<div class='sfcode' id='sfcode4326'>&#160;&#160;&#160; gridComplete: function(){<br />&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;var ids = jQuery(&#34;#breed_list&#34;).jqGrid(&#39;getDataIDs&#39;);<br />&#160;&#160; &#160;&#160;&#160; &#160;for(var i=0;i &#60; ids.length;i++)<br />&#160;&#160; &#160;&#160;&#160; &#160;{ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var cl = ids[i];<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ed = &#34;&#60;img src=\&#34;../images/edit.png\&#34; alt=\&#34;Edit\&#34; onclick=\&#34;jQuery(&#39;#breed_list&#39;).editRow(&#39;&#34;+cl+&#34;&#39;);\&#34; /&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;de = &#34;&#60;img class=\&#34;del_row\&#34; src=\&#34;../images/delete.png\&#34; alt=\&#34;Delete\&#34; /&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;ce = &#34;&#60;input class=\&#34;del_row\&#34; type=&#39;button&#39; onclick=\&#34;deleteRow()\&#34; /&#62;&#34;; <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#breed_list&#34;).jqGrid(&#39;setRowData&#39;,ids[i],{act:ed+de+ce}); <br />&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;<br />&#160;&#160; &#160;&#160;&#160; &#160;$(this).mouseover(function() {<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var valId = $(&#39;.ui-state-hover&#39;).attr(&#34;id&#34;);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#34;#breed_list&#34;).setSelection(valId, false);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;alert(valId);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;//deleteRow(valId)<br />&#160;&#160; &#160;&#160;&#160; &#160;});</div>
<p>Custom function code:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7098' value='Select Code' data-codeid='sfcode7098' /></p>
<div class='sfcode' id='sfcode7098'>function deleteRow(){</p>
<p>&#160;&#160;&#160; // Get the currently selected row<br />&#160;&#160;&#160; var toDelete = $(&#34;#breed_list&#34;).jqGrid(&#39;getGridParam&#39;,&#39;selrow&#39;);</p>
<p>&#160;&#160;&#160; // You&#39;ll get a pop-up confirmation dialog, and if you say yes,<br />&#160;&#160;&#160; // it will call &#34;delete.php&#34; on your server.<br />&#160;&#160;&#160; $(&#34;#breed_list&#34;).jqGrid(<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#39;delGridRow&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; toDelete,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; { <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: &#39;delete.php&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; reloadAfterSubmit:false<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; );<br />&#160;&#160;&#160; //alert(toDelete);</p>
<p>}</p>
</div>
<p>That code auto selects the hovered cell correctly when delGridRow is NOT executed.&#160; When I click the button under the actions column it calls the deleteRow() function which executes delGridRow. When I click cancel the delete form closes.&#160; Now, when I hover a cell it does NOT auto select the current hovered cell.&#160; To debug this I placed alert(valId) in the .mouseover function which returns eData instead of the id attribute value.&#160; alert(valId) alerts out the id attribute value as long as the deleteRow function is not executed.&#160; Why is eData set to valId&#160; when it should return the id attribute value? How do I fix this issue?</p>
</p>
<p>-Thank You,</p>
<p>&#160;&#160;&#160;&#160; Rich</p>
]]></description>
        	        	<pubDate>Fri, 29 Apr 2011 09:36:01 +0300</pubDate>
        </item>
</channel>
</rss>