<?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: Documentation bug: custom editing</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/documentation-bug-custom-editing</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/bugs/documentation-bug-custom-editing/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>vchekan on Documentation bug: custom editing</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/documentation-bug-custom-editing#p17821</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/documentation-bug-custom-editing#p17821</guid>
        	        	<description><![CDATA[<p>Something went wrong with code formatting, so reposing my function:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8133' value='Select Code' data-codeid='sfcode8133' /></p>
<div class='sfcode' id='sfcode8133'>function sitesGridValue(elem, operation, param) {<br />&#160;&#160;&#160; switch (operation) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;get&#39;: <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return $(&#34;table.ui-jqgrid-btable&#34;, elem).getRowData();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;set&#39;: <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return $(&#34;table.ui-jqgrid-btable&#34;, elem)[0].addJSONData(JSON.parse(param));<br />&#160;&#160;&#160; }<br />}</div>
]]></description>
        	        	<pubDate>Wed, 09 Jun 2010 03:00:34 +0300</pubDate>
        </item>
        <item>
        	<title>vchekan on Documentation bug: custom editing</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/documentation-bug-custom-editing#p17820</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/documentation-bug-custom-editing#p17820</guid>
        	        	<description><![CDATA[<p>I&#39;m not sure where to file wkiki bugs, so let me know if there is a better place.</p>
<p><a href="/jqgridwiki/doku.php?id=wiki:common_rules#edittype" target="_blank">Common Editing properties</a> -&#62; <a id="edittype" name="edittype" target="_blank">edittype -&#62; custom -&#62; code example</a></p>
<p>describes function as:</p>
<pre class="code javascript"><p><input type='button' class='sfcodeselect' name='sfselectit2262' value='Select Code' data-codeid='sfcode2262' /></p><div class='sfcode' id='sfcode2262'>function myvalue(elem)</div>Which is wrong. This function is called in 2 different scenario: befor submitting data, to get data from custom editor, and before showing custom <br />editor to poppulate it with data.<br />Here is what I came up with for my application (can will be different in the wiki example context):<br /><br /><p><input type='button' class='sfcodeselect' name='sfselectit535' value='Select Code' data-codeid='sfcode535' /></p><div class='sfcode' id='sfcode535'>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; function sitesGridValue(elem, operation, param) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; switch (operation) {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;get&#39;: <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return $(&#34;table.ui-jqgrid-btable&#34;, elem).getRowData();<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; case &#39;set&#39;: <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return $(&#34;table.ui-jqgrid-btable&#34;, elem)[0].addJSONData(JSON.parse(param));<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; }</div>It is crucial to recognize get/set operation, otherwise you will get some unky behavior, for example, custom field does not change <br />when you navigate forward/backwards.</pre>
]]></description>
        	        	<pubDate>Wed, 09 Jun 2010 02:57:40 +0300</pubDate>
        </item>
</channel>
</rss>