<?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: How to retain the new value from a SELECT ?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-retain-the-new-value-from-a-select</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/how-to-retain-the-new-value-from-a-select/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>MarvinBanana on How to retain the new value from a SELECT ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-retain-the-new-value-from-a-select#p17771</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-retain-the-new-value-from-a-select#p17771</guid>
        	        	<description><![CDATA[<p><strong>How to retain the new value from a SELECT ?&#160; </strong></p>
<p>I have been experimenting with the edittype &#39;select&#39; in jqGrid.</p>
<p>The example <a href="http://www.trirand.com/blog/jqgrid/jqgrid.html" rel="nofollow" target="_blank"><a href="http://www.trirand.com/blog/jq" rel="nofollow">http://www.trirand.com/blog/jq</a>.....qgrid.html</a> - Input Types works, except that the values selected are overwritten when you select a new row. <br />The restoreRow function overwrites the new value.&#160; <br />If I comment out the restoreRow function, the value remains, but the select box is still visible, and the row remains selected. </p>
<p>I would like the new value to &#39;stick&#39;, but still want the select box to disappear and the row to visually lose focus (i.e. no longer highlighted). &#160;</p>
<p>How should this be coded? I tried to add saveRow (see below) but it didn&#39;t work. </p>
<p>onSelectRow: function(Id){ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(Id &#38;&#38; Id!==lastsel2){ <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160; <br />&#160;&#160; &#160;&#160;&#160; <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;// saveRow : function(rowid, succesfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc)<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<strong>jQuery(&#39;#list4&#39;).jqGrid(&#39;saveRow&#39;,Id); </strong>// did not work. <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160;&#160; <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;<strong> jQuery(&#39;#list4&#39;).jqGrid(&#39;restoreRow&#39;,lastsel2); </strong><br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;jQuery(&#39;#list4&#39;).jqGrid(&#39;editRow&#39;,Id,true); <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;lastsel2=Id; } <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;},</p>
]]></description>
        	        	<pubDate>Sun, 06 Jun 2010 21:32:23 +0300</pubDate>
        </item>
</channel>
</rss>