<?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: Implement file uopload on add and edit</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/implement-file-uopload-on-add-and-edit</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/feature-request/implement-file-uopload-on-add-and-edit/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>phicarre on Implement file uopload on add and edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/implement-file-uopload-on-add-and-edit#p29442</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/implement-file-uopload-on-add-and-edit#p29442</guid>
        	        	<description><![CDATA[<p>Why the setTimeout at the end ?</p>
<p>Is it not possible to clone the original form, remove the name attribute and submit it ?</p>
]]></description>
        	        	<pubDate>Thu, 05 Sep 2013 19:22:53 +0300</pubDate>
        </item>
        <item>
        	<title>kobruleht on Implement file uopload on add and edit</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/implement-file-uopload-on-add-and-edit#p24777</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/implement-file-uopload-on-add-and-edit#p24777</guid>
        	        	<description><![CDATA[<p>Please add possibility to upload field content as file files if new row is added or old row is edited</p>
<p>There are several two code samples which implement this:</p>
<p><a href="http://jqgrid-php.net/examples" rel="nofollow" target="_blank">http://jqgrid-php.net/examples</a></p>
<p>Tony sample in&#160;</p>
<p><a rel="nofollow" href="/blog/?page_id=393/feature-request/file-upload-again/" target="_blank"></a><a href="http://www.trirand.com/blog/?p" rel="nofollow" target="_blank">http://www.trirand.com/blog/?p</a>.....oad-again/</p>
<p>does not work if adding new row and requires&#160;jquery less than 1.5 version due to usage of outdated plugin.</p>
</p>
<p>Adding this seems simple.</p>
<p>code in jqgrid-php.net uses dataproxy property and is simple:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit3932' value='Select Code' data-codeid='sfcode3932' /></p>
<div class='sfcode' id='sfcode3932'>editurl&#160;&#160; : null,</div>
<p><input type='button' class='sfcodeselect' name='sfselectit9743' value='Select Code' data-codeid='sfcode9743' /></p>
<div class='sfcode' id='sfcode9743'>dataProxy: function(opts, act)<br />&#160;{<br />&#160;&#160;//get url<br />&#160;&#160;opts.url = $(this).getGridParam(&#39;url&#39;);<br />&#160;&#160;<br />&#160;&#160;//use normal ajax-call for del<br />&#160;&#160;if(act.substring(0, 4) == &#39;del_&#39;)<br />&#160;&#160;{<br />&#160;&#160;&#160;$.ajax(opts);<br />&#160;&#160;}<br />&#160;&#160;<br />&#160;&#160;//force iframe<br />&#160;&#160;opts.iframe = true;<br />&#160;&#160;<br />&#160;&#160;var $form = $(&#39;#FrmGrid_&#39; + $(this).getGridParam(&#39;id&#39;));<br />&#160;&#160;var ele = $form.find(&#39;INPUT,TEXTAREA&#39;).not(&#39;:file&#39;);<br />&#160;&#160;<br />&#160;&#160;//Prevent non-file inputs double serialization<br />&#160;&#160;ele.each(function()<br />&#160;&#160;{<br />&#160;&#160;&#160;$(this).data(&#39;name&#39;, $(this).attr(&#39;name&#39;)).removeAttr(&#39;name&#39;);<br />&#160;&#160;});<br />&#160;&#160;<br />&#160;&#160;//Send only previously generated data + files<br />&#160;&#160;$form.ajaxSubmit(opts);<br />&#160;&#160;<br />&#160;&#160;//Set names back after form being submitted<br />&#160;&#160;setTimeout(function()<br />&#160;&#160;{<br />&#160;&#160;&#160;ele.each(function()<br />&#160;&#160;&#160;{<br />&#160;&#160;&#160;&#160;$(this).attr(&#39;name&#39;, $(this).data(&#39;name&#39;));<br />&#160;&#160;&#160;});<br />&#160;&#160;}, 200);<br />&#160;}</div></p>
]]></description>
        	        	<pubDate>Fri, 30 Sep 2011 10:20:30 +0300</pubDate>
        </item>
</channel>
</rss>