<?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: Getting data from a form (userData)</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata</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/getting-data-from-a-form-userdata/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Getting data from a form (userData)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p9098</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p9098</guid>
        	        	<description><![CDATA[<p>or simply use the editData array.</p>
<p>See <a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing#editgridrow" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>.....ditgridrow</a></p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 31 Aug 2009 05:24:40 +0300</pubDate>
        </item>
        <item>
        	<title>Renso on Getting data from a form (userData)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p8987</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p8987</guid>
        	        	<description><![CDATA[<p>If I understand/assume correctly, the POINIT is posted when retrieving the data when populating the grid, but not when editing or adding the data? "postData" property will not post it when editing, adding or deleting via the navGrid CRUD functions. For that you need to append it to the editUrl as in <span style="color: #ff0000;">editUrl: myUrl + &#39;?POINIT=&#39; +$(&#39;#POINIT&#39;).val();</span><strong></strong></p>
</p>
<p>When you say it works outside of the grid, I am not sure how you or where you tested this, so try and do a console.log with Firebug or alert to show the value of POINIT just before the grid is defined, something like:</p>
</p>
<p>console.log($(&#39;#POINIT&#39;).val());</p>
<p>$(&#39;#list&#39;).jqGrid......</p>
]]></description>
        	        	<pubDate>Thu, 27 Aug 2009 07:32:10 +0300</pubDate>
        </item>
        <item>
        	<title>dsh0105 on Getting data from a form (userData)</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p8974</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/getting-data-from-a-form-userdata#p8974</guid>
        	        	<description><![CDATA[<p>I&#39;m trying to send extra variables to the script that populates the grid. The information is stored in a form. From what I can tell, this is acomplished using userData. Indeed what I&#39;ve got does submit the from field &#8212; but no the value.</p>
<p>I checked the javascript that pulls the form value. When used outside of the grid, it works used inside the gird it always posts null. Any help would be greatly appriciated.</p>
<p>Here&#39;s the client side code I&#39;m working with. I&#39;ve bolded the line in question.</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5805' value='Select Code' data-codeid='sfcode5805' /></p>
<div class='sfcode' id='sfcode5805'>jQuery(document).ready(function(){ <br />&#160; jQuery(&#8221;#list&#8221;).jqGrid({<br />&#160;&#160;&#160; url:&#39;poquery.php&#39;,&#160;&#160;&#160; <br />&#160;&#160;&#160; datatype: &#39;json&#39;,<br />&#160;&#160;&#160; mtype: &#39;POST&#39;,<br />&#160;&#160;&#160; colNames:[&#39;PO Number &#39;,&#39;Date&#39;,&#39;Vendor&#39;,&#39;Dept&#39;,&#39;Buyer&#39;,&#39;Terms&#39;],<br />&#160;&#160;&#160; colModel :[ <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;PONUMB&#39;, index:&#39;PONUMB&#39;, width:65}, <br />&#160;&#160;&#160;&#160;&#160; {name:&#39;PODATE&#39;, index:&#39;PODATE&#39;, width:70},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;POVEND&#39;, index:&#39;POVEND&#39;, width:70},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;POIDPT&#39;, index:&#39;POIDPT&#39;, width:70},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;POINIT&#39;, index:&#39;POINIT&#39;, width:70},<br />&#160;&#160;&#160;&#160;&#160; {name:&#39;TERMS&#39;, index:&#39;TERMS&#39;, width:70},</p>
<p>&#160;&#160;&#160; <br />&#160;&#160;&#160; ],<br />&#160;&#160;<strong>&#160; postData: {POINIT : jQuery(&#39;#POINIT&#39;).val()},</strong></p>
<p>&#160;&#160;&#160; pager: &#39;#pager&#39;,<br />&#160;&#160;&#160; rowNum:10,<br />&#160;&#160;&#160; rowList:[10,20,30],<br />&#160;&#160;&#160; sortname: &#39;PONUMB&#39;,<br />&#160;&#160;&#160; sortorder: &#39;desc&#39;,<br />&#160;&#160;&#160; viewrecords: true,<br />&#160;&#160;&#160; caption: &#39;Purchase orders&#39;<br />&#160; }).navGrid(&#39;#gridpager&#39;,{view:false,edit:false,add:false, del:false}, <br />{}, // use default settings for edit<br />{}, // use default settings for add<br />{},&#160; // delete instead that del:false we need this<br />{multipleSearch : true}, // enable the advanced searching<br />{closeOnEscape:true} /* allow the view dialog to be closed when user press ESC key*/<br />);</p>
<p>&#160;});</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit3687' value='Select Code' data-codeid='sfcode3687' /></p>
<div class='sfcode' id='sfcode3687'>
<p>Here is a snipet from the form showing where the value is defined.</p>
</div>
<p><input type='button' class='sfcodeselect' name='sfselectit4244' value='Select Code' data-codeid='sfcode4244' /></p>
<div class='sfcode' id='sfcode4244'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;td width=&#8221;47&#8243;&#62;&#60;select name=&#8221;POINIT&#8221; id=&#8221;POINIT&#8221; multiple=&#8221;multiple&#8221;&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;?php<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; $buyers=getBuyerList();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; foreach ($buyers as $buyer)<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;&#160;&#160;&#160;&#160; $init=$buyer-&#62;BUYER;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; echo &#8220;&#60;option value=\\&#8221;$init\\&#8221;&#62;$init&#60;/option&#62;&#8221;;<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; ?&#62;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &#60;/select&#62;&#60;/td&#62;</div>
<p>Any help you can provide would be greatly appricated.</p>
<p><strong>Edited to correct error. Function being used is postData -- not userData.</strong></p>
<p>Thanks,</p>
</p>
<p>David Hamilton</p>
]]></description>
        	        	<pubDate>Wed, 26 Aug 2009 08:24:11 +0300</pubDate>
        </item>
</channel>
</rss>