<?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: jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick</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/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>sProcurement on jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p26842</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p26842</guid>
        	        	<description><![CDATA[<p>I forgot to mention that I am using local data</p>
]]></description>
        	        	<pubDate>Sat, 23 Jun 2012 02:53:01 +0300</pubDate>
        </item>
        <item>
        	<title>sProcurement on jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p26841</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p26841</guid>
        	        	<description><![CDATA[</p>
<p>I am trying to use jqgrid treeview with table DND plugin to make tree nodes/leafs ( multiple rows)&#160;drag and drop between two grids.&#160; I tried to use the code shown here. but it is not working for me. I am very new to jquery world. Please let me know if it is possible ?&#160;and will appreciate sharing some example code</p>
<p>thanks</p>
]]></description>
        	        	<pubDate>Sat, 23 Jun 2012 02:52:06 +0300</pubDate>
        </item>
        <item>
        	<title>Renso on jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p4063</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p4063</guid>
        	        	<description><![CDATA[<p>Thank you for your reply Tony.</p>
<p>Since the tableDnD passes in the row parm I was able to use the setSelection after a 200 milisecond delay:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8970' value='Select Code' data-codeid='sfcode8970' /></p>
<div class='sfcode' id='sfcode8970'>$(item).trigger(&#39;reloadGrid&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; setTimeout(function() { $(item).setSelection($(row).attr(&#39;id&#39;)); }, 200);</div>
<p>BTW, 200 miliseconds seems to be the minimum, if I go below this it starts to get unpredictable for larger lists. For example if you have a list of countries 100 is too little. For a list of 10 or so, 50 miliseconds is more than enough, so to be on the safe side and since my list of countries is the biggest I opted for 200ms. Please note that I use the same jqGrid for all my lookups.</p></p>
]]></description>
        	        	<pubDate>Tue, 20 Jan 2009 09:29:56 +0200</pubDate>
        </item>
        <item>
        	<title>tony on jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p4048</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p4048</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The most common problem here that you should understand is this: (if I understand right)</p>
<p><span style="color: #ff0000;">$(item).trigger(&#39;reloadGrid&#39;); </span></p>
<p>After this you should call the expression</p>
<p><span style="color: #0000ff;">$(item).find(&#39;tr#&#39;+$(row).attr(&#39;id&#39;)).addClass(&#39;selected&#39;);</span></p>
<p>WITH DELAY.</p>
<p>Use setTimeout for this purpose.</p>
<p>Regards</p>
<p>Tony</p>
<p>P.S. I suggest you to use setSelection for the experssion in blue.</p>
<p>or if this is not possible you should call setGridParam({selrow:&#39;the_id_here&#39;}) after the expression</p>
]]></description>
        	        	<pubDate>Mon, 19 Jan 2009 11:38:21 +0200</pubDate>
        </item>
        <item>
        	<title>Renso on jqGrid + tableDnD selected class for row editing removed on mouseclick</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p3992</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/jqgrid-tablednd-selected-class-for-row-editing-removed-on-mouseclick#p3992</guid>
        	        	<description><![CDATA[<p>I am using the tableDnD with jqGrid. AWESOME! So when I click on the row to move the item, it works fine with no issues.</p>
<p>Once you move your row, I make an ajax call on the tableDnD&#39;s onDrop handle. So when the data has been updated by the server I want to reload the grid (which works just fine) so that the sort order (which is also a colModel column the user can see) can be refreshed on the screen. This works great too. Bu now this is where I have the issue. How do I edit the record, that is, your jqGrid adds the "selected" class to the row so that when I click on the jqGrid footer&#39;s "edit this record" button it knows what record you selected. I tried to keep a reference with a variable to the row that was clicked on, but even though it successfully adds the "selected" class back to the clicked row after the grid has reloaded, I can see this in Firebug, it just adds it temporarily and then something else removes it again after just a split second, I am not sure what is removing it. I don&#39;t know if anyone else has this issue, and ideas. See my code example below:</p>
<p>item = my grid variable:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5665' value='Select Code' data-codeid='sfcode5665' /></p>
<div class='sfcode' id='sfcode5665'>
<p>$(item).jqGrid({</p>
<p>...</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; gridComplete: function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;tr.jqgrow&#39;, item).find(&#39;td:first&#39;).addClass(&#39;dragHandle&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(&#39;tr.jqgrow&#39;).hover(function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this.cells[0]).addClass(&#39;showDragHandle&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }, function() {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(this.cells[0]).removeClass(&#39;showDragHandle&#39;);<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; });&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $(item).tableDnDUpdate();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; },</p>
<p>...</p>
<p>})&#160;&#160; //end of jqGrid definition</p>
<p>.tableDnD({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; onDrop: function(table, row) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $.ajax({<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; data: $.tableDnD.serialize(),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; url: $(&#39;#ajaxUpdateLookupSortOrderUrl&#39;).val() + &#39;/?lookup=&#39; + $(&#39;#LookupListWrapper #LookupListSearchWrapper #Lookups&#39;).val(),<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; type: "POST",<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; success: function(data, result) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; //Reload so that the SortOrder column is refreshed from the DB with the new Sort Order<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: #ff0000;"> $(item).trigger(&#39;reloadGrid&#39;);</span><br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<span style="color: #0000ff;">&#160; $(item).find(&#39;tr#&#39;+$(row).attr(&#39;id&#39;)).addClass(&#39;selected&#39;);</span>//trying to add the class back so that I can click on edit button<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; })<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }<br />&#160;&#160;&#160; })<br />&#160;&#160;&#160; ;</p>
</div>
]]></description>
        	        	<pubDate>Thu, 15 Jan 2009 15:47:59 +0200</pubDate>
        </item>
</channel>
</rss>