<?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: Form Edit a column which Uses Formatters</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-a-column-which-uses-formatters</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/form-edit-a-column-which-uses-formatters/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Form Edit a column which Uses Formatters</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-a-column-which-uses-formatters#p27512</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-a-column-which-uses-formatters#p27512</guid>
        	        	<description><![CDATA[<p>Hello,</p>
</p>
<p>I think that when you use edit type select it will be fine.</p>
<p>With other words - use formatter select and edittype select with the <a href="/jqgridwiki/doku.php?id=wiki:common_rules&#38;s[]=edittype" target="_blank">appropriate options</a>.</p>
</p>
<p>Regards</p></p>
]]></description>
        	        	<pubDate>Thu, 11 Oct 2012 17:28:28 +0300</pubDate>
        </item>
        <item>
        	<title>AHumphries on Form Edit a column which Uses Formatters</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/form-edit-a-column-which-uses-formatters#p27504</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/form-edit-a-column-which-uses-formatters#p27504</guid>
        	        	<description><![CDATA[<p>Hi, I have a grid, which has a &#39;boolean&#39; column (1 or 0). I have a formatter on this column, which says, when &#39;1&#39; display a Tick.gif, when 0, display a Cross.gif, (based on the jqgrid examples available from <a href="http://tpeczek.codeplex.com/releases/view/61796" rel="nofollow" target="_blank"><a href="http://tpeczek.codeplex.com/re" rel="nofollow">http://tpeczek.codeplex.com/re</a>.....view/61796</a>)</p>
<p>that works well.</p>
<p>however, When Using formEditor fuinctionality, the value That I am seeing passed to the form is the &#160;&#60;img &#62; tag of The appropriate gif used. and NOT 1 or 0.</p>
<p>I want the edittype of this column to be edittype: &#39;checkbox&#39;, editoptions {value:"1:0"}&#160;</p>
<p>and when Save is clicked, a &#39;1&#39; or &#39;0&#39; value passed to the controller url to save the proper value.&#160;</p>
</p>
<p>How can i do this?</p>
</p>
<p>Code extracts:</p>
<p>..</p>
<p>..</p>
<p>colModel: [</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;LogonName&#39;, index: &#39;LogonName&#39;, align: &#39;left&#39;, width:80, editable:true },</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;{ name: &#39;FullName&#39;, index: &#39;FullName&#39;, align: &#39;left&#39;, editable:true, width: 200 },</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;<strong>&#160;{ name: &#39;&#39;Enabled&#39;, index: &#39;IsTranbase&#39;, align: &#39;center&#39;, width: 30, editable:true, formatter: YesNoFormatter,edittype: &#39;checkbox&#39;, editoptions: {value:"1:0"} },</strong></p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; { name: &#39;myac&#39;, width:80, fixed:true, sortable:false, resize:false, editable:false, formatter:&#39;actions&#39;, formatoptions:{&#160;keys:true,&#160;delOptions: { url : encodeURI(&#39;@Url.Action("Delete")&#39;) }</p>
<p>}</p>
<p>..</p>
<p>..</p>
<p>function YesNoFormatter(cellvalue, options, rowObject) {</p>
<p>&#160; &#160; &#160; &#160; var cellValueInt = parseInt(cellvalue);</p>
<p>&#160; &#160; &#160; &#160;&#160;if (cellValueInt == 1)</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;return "&#60;img src=&#39;@Url.Content("~/Content/images/tick.gif")&#39; /&#62;";</p>
<p>&#160; &#160; &#160; &#160;&#160;else</p>
<p>&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;return "&#60;img src=&#39;@Url.Content("~/Content/images/cross.gif")&#39; /&#62;";</p>
<p>};</p></p>
]]></description>
        	        	<pubDate>Tue, 09 Oct 2012 15:04:23 +0300</pubDate>
        </item>
</channel>
</rss>