<?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: Inline Editing:  Re-Organize postData</title>
	<link>http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata</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/inline-editing-re-organize-postdata/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>brandonkirsch on Inline Editing:  Re-Organize postData</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26488</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26488</guid>
        	        	<description><![CDATA[<p>I have found other (better) ways to accomplish the separation of request variables without modifications to JQGrid.</p>
</p>
<p>First, the &#39;prmNames&#39; option can be used to adjust all JQGrid request parameters. &#160;I have used this to prefix all variables into their own "jqgrid_" namespace, so to speak.</p>
<p>Second, I have adjusted my colModel to prefix each of my column names with "row_" and that allows me to separate request variables during server side processing.</p>
</p>
<p>JQGrid options are flexible enough to meet all of my needs, no modifications needed. &#160;Thanks again!</p>
]]></description>
        	        	<pubDate>Sat, 28 Apr 2012 20:44:39 +0300</pubDate>
        </item>
        <item>
        	<title>brandonkirsch on Inline Editing:  Re-Organize postData</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26486</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26486</guid>
        	        	<description><![CDATA[<p>Here is the diff output of my completed patch. &#160;It doesn&#39;t work 100% as described above, instead it simply puts all of the grid row data into a new property called "rowdata". &#160;So the postData request object looks like:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit4237' value='Select Code' data-codeid='sfcode4237' /></p>
<div class='sfcode' id='sfcode4237'>
<p>{</p>
<p>&#160;&#39;oper&#39; : &#39;edit&#39;,</p>
<p>&#160;&#39;id&#39; : $rowID,</p>
<p>&#160;&#39;rowdata&#39; : {</p>
<p>&#160; // built exactly like parent object, except does not contain &#34;oper&#34; or &#34;id&#34; unless they are actually columns on the grid.</p>
<p>&#160;}</p>
<p>}</p>
</div>
<p>Then a small change in the call to "setRowData" under saveRow -&#62; $.ajax -&#62; complete() handler to pass in tmp.rowdata instead of tmp.</p>
<p>The patch works and doesn&#39;t appear that it should cause any conflict with other parts of the plugin or jqGrid itself. &#160;However, I cannot paste the "diff" output here so I will try to find a way to submit the patch on github.</p>
</p>
<p>EDIT: &#160;Patch was updated to try and maintain backwards compatibility with existing client or server-side scripts that expect `tmp` to contain {fieldName : value} for all columns in the grid.</p>
<p>Patch is available at <a href="https://github.com/brandonkirsch/jqGrid/blob/master/js/grid.inlinedit.js" target="_blank">https://github.com/brandonkirsch/jqGrid/blob/master/js/grid.inlinedit.js</a></p>
</p>
<p>Thanks,</p>
<p>Brandon</p>
]]></description>
        	        	<pubDate>Fri, 27 Apr 2012 22:22:56 +0300</pubDate>
        </item>
        <item>
        	<title>brandonkirsch on Inline Editing:  Re-Organize postData</title>
        	<link>http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26485</link>
        	<category>Feature Request</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/feature-request/inline-editing-re-organize-postdata#p26485</guid>
        	        	<description><![CDATA[<p>Hello everyone,</p>
<p>First off, I would like to say thank you for such a great utility and its permissive MIT licensing. &#160;JQGrid is a fantastic &#38; mature collection and I am happy to add it to my toolkit. &#160;However, I think there is room for improvement &#8211; specifically in the new inlinedit.js plugin for inline editing.</p>
<p>Currently, the inlinedit plugin has a "saveRow" method that collects the current set of row data and builds an object of {$columnName : $value, &#8230;} &#160;But after it is done processing all of the columns, it then adds in {&#39;id&#39; : $rowID, &#39;oper&#39; : &#39;edit&#39;} to the same object for AJAX POST. &#160;This presents a name collision for SQL tables that have columns named "id" or "oper" that is not easy to cleanup using the serializeRowData() event handler.</p>
<p>I think the inlinedit.js plugin would be better off if the postData was altered to look more like this:</p>
<p>&#160;</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2290' value='Select Code' data-codeid='sfcode2290' /></p>
<div class='sfcode' id='sfcode2290'>
<p>{&#160;</p>
<p>&#160; &#39;request&#39; : {</p>
<p>&#160; &#160; &#160; &#160;&#39;id&#39; : $rowID,</p>
<p>&#160; &#160; &#160; &#160;&#39;oper&#39; : &#39;edit&#39;</p>
<p>&#160; },</p>
<p>&#160; &#39;rowData&#39; : {</p>
<p>&#160; &#160; &#160; &#160; &#39;colName1&#39; : value1,</p>
<p>&#160; &#160; &#160; &#160; &#39;colName2&#39; : value2,</p>
<p>&#160; &#160; &#160; &#160; &#39;id&#39; : someOtherIDValueFromGrid,</p>
<p>&#160; &#160; &#160; &#160; &#39;oper&#39; : someOtherOperValueFromGrid</p>
<p>&#160; }</p>
<p>}</p>
</div>
<p>This way, "internal" jqGrid variables like "id" and "oper" do not collide with any fields that happen to have the same name.</p>
<p>I am working on a patch to grid.inlinedit.js to enable proper separation of request variables, but I am worried that the improvements will be lost in future versions of jqGrid. &#160;Is there any chance that you would consider accepting these modifications when they are complete?</p>
</p>
<p>Thank you.</p>
<p>-Brandon</p>
]]></description>
        	        	<pubDate>Fri, 27 Apr 2012 21:07:29 +0300</pubDate>
        </item>
</channel>
</rss>