<?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: Formatted value in inline edit control</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/formatted-value-in-inline-edit-control</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/formatted-value-in-inline-edit-control/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Formatted value in inline edit control</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/formatted-value-in-inline-edit-control#p29885</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/formatted-value-in-inline-edit-control#p29885</guid>
        	        	<description><![CDATA[<p>I think you got the point.</p>
<p>RegardsHello,</p>
</p>
<p>You can store the original value in span element and then use it in whe you unformat it.</p>
<p>This is a example from our commertial jqGrid</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit8396' value='Select Code' data-codeid='sfcode8396' /></p>
<div class='sfcode' id='sfcode8396'>
<p>colModel : [</p>
<p>...</p>
<p>{name: &#39;myname&#39;,..., formatter : formatRating, unformat : unformatRating, ...}</p>
<p>...</p>
<p>],</p>
<p>&#8230;</p>
<p>});</p>
</p>
<p>&#160;&#160;&#160; function formatRating(cellValue, options, rowObject) {<br />&#160;&#160; &#160;&#160;&#160; &#160;var color = (parseInt(cellValue) &#62; 0) ? &#34;green&#34; : &#34;red&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;var cellHtml = &#34;&#60;span style=&#39;color:&#34; + color + &#34;&#39; originalValue=&#39;&#34; + <br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;cellValue + &#34;&#39;&#62;&#34; + cellValue + &#34;&#60;/span&#62;&#34;;<br />&#160;&#160; &#160;&#160;&#160; &#160;return cellHtml;<br />&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160;<br />&#160;&#160; &#160;function unformatRating(cellValue, options, cellObject) {<br />&#160;&#160; &#160;&#160;&#160; &#160;return $(cellObject.html()).attr(&#34;originalValue&#34;);</p>
</div>
<p>I think you got the point.</p>
</p>
<p>Regards</p>
]]></description>
        	        	<pubDate>Mon, 25 Nov 2013 18:24:03 +0200</pubDate>
        </item>
        <item>
        	<title>Misanthrope13 on Formatted value in inline edit control</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/formatted-value-in-inline-edit-control#p29865</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/formatted-value-in-inline-edit-control#p29865</guid>
        	        	<description><![CDATA[<p>Hey there,</p>
</p>
<p>I have a table with some custom formatted data and an inline edit function. I have a custom control for editing. When I start the edit mode I want to edit the "original" cell value and not the formatted cell value.</p>
</p>
<p>Please take a look at the following fiddle: <a href="http://jsfiddle.net/8ybSs/1/" rel="nofollow" target="_blank">http://jsfiddle.net/8ybSs/1/</a></p>
</p>
<p>I think the problem ist the value parameter in the custom_element function "myelem". I&#39;ts the formatted string instead of the original value. How can I get the original cell value here?</p>
]]></description>
        	        	<pubDate>Thu, 21 Nov 2013 10:22:35 +0200</pubDate>
        </item>
</channel>
</rss>