<?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: Adding addition value to POST fails</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/adding-addition-value-to-post-fails</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/adding-addition-value-to-post-fails/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Adding addition value to POST fails</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/adding-addition-value-to-post-fails#p30504</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/adding-addition-value-to-post-fails#p30504</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>editData is a option where you add a values usually only once when the formeditiong is initialized.</p>
<p>In your case you will need to use serializeEditData&#160; event in for editing. See the doc.</p>
<p>This should look something like this:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit9771' value='Select Code' data-codeid='sfcode9771' /></p>
<div class='sfcode' id='sfcode9771'>
<p>$("#grid").jqGrid("navGrid", "#pager",</p>
<p>{ add: true,</p>
<p>edit: true,</p>
<p>del: false,</p>
<p>search: false,</p>
<p>refresh: false,</p>
<p>// edit</p>
<p>{</p>
<p>serializeEditData : function(postdata) {</p>
<p>// calculate the id and do</p>
</p>
<p>postdata.EmpID = value;</p>
<p>return postdata;</p>
<p>}</p>
<p>}</p>
<p>...</p>
<p>);</p>
</p>
</div>
<p>Regards</p>
]]></description>
        	        	<pubDate>Wed, 16 Apr 2014 12:26:17 +0300</pubDate>
        </item>
        <item>
        	<title>rickyRoszak on Adding addition value to POST fails</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/adding-addition-value-to-post-fails#p30500</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/adding-addition-value-to-post-fails#p30500</guid>
        	        	<description><![CDATA[<p>I am trying to add an additional value to the POST I send after editing a row. &#160;The editable column values all show up in the request when I check in the servlet but &#39;empId&#39; which is not editable does noit show up. &#160;I tried adding it with editData and have had no luck. &#160;The code is below:</p>
</p>
<p>&#60;!DOCTYPE html&#62;</p>
<p>&#60;html&#62;</p>
<p>&#60;head&#62;</p>
<p>&#60;title&#62;jqGrid Template&#60;/title&#62;</p>
<p>&#60;link rel="stylesheet" href="css/jquery.ui.theme.css" /&#62;</p>
<p>&#60;link rel="stylesheet" href="css/ui.jqgrid.css" /&#62;</p>
<p>&#60;script src="js/jquery.js"&#62;&#60;/script&#62;</p>
<p>&#60;script src="js/grid.locale-en.js"&#62;&#60;/script&#62;</p>
<p>&#60;script src="js/jquery.jqGrid.min.js"&#62;&#60;/script&#62;</p>
<p>&#60;/head&#62;</p>
<p>&#60;body&#62;</p>
<p>&#60;table id="grid"&#62;&#60;/table&#62;</p>
<p>&#60;div id="pager"&#62;&#60;/div&#62;</p>
<p>&#60;script&#62;</p>
<p>$("#grid").jqGrid({</p>
<p>datatype: "json",</p>
<p>url: "LoadJsonDataServlet?type=BS21 7RH",</p>
<p>pager: "#pager",</p>
<p>mType: &#39;POST&#39;,</p>
<p>colModel:[</p>
<p>{name:&#39;empId&#39;, width:100, editable:false},</p>
<p>{name:&#39;firstName&#39;,width:100, editable:true},</p>
<p>{name:&#39;lastName&#39;, width:100, editable:true},</p>
<p>{name:&#39;address&#39;, width:500, editable:true}</p>
<p>],</p>
<p>editurl: "UpdateDataServlet"</p>
<p>});</p>
<p>$("#grid").jqGrid("navGrid", "#pager",</p>
<p>{ add: true,</p>
<p>edit: true,</p>
<p>del: false,</p>
<p>search: false,</p>
<p>refresh: false,</p>
<p>edit : {</p>
<p>addCaption: "Add Record",</p>
<p>editCaption: "Edit Record",</p>
<p>bSubmit: "Submit",</p>
<p>bCancel: "Cancel",</p>
<p>bClose: "Close",</p>
<p>saveData: "Data has been changed! Save changes?",</p>
<p>bYes : "Yes",</p>
<p>bNo : "No",</p>
<p>bExit : "Cancel",</p>
<p>editData:{</p>
<p>EmpId: function(){</p>
<p>var sel_id = $("#grid").jqGrid("getGridParam", &#39;selrow&#39;);</p>
<p>var value = $("#grid").jqGrid("getCell", sel_id, &#39;empId&#39;);</p>
<p>return value;</p>
<p>}</p>
<p>}</p>
<p>}</p>
<p>},</p>
<p>{recreateForm: true,</p>
<p>closeAfterEdit: true,</p>
<p>modal:true}</p>
<p>);</p>
<p>&#60;/script&#62;</p>
<p>&#60;/body&#62;</p>
<p>&#60;/html&#62;</p></p>
]]></description>
        	        	<pubDate>Tue, 15 Apr 2014 18:44:43 +0300</pubDate>
        </item>
</channel>
</rss>