<?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: formatter and select tag in editGridRow</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/formatter-and-select-tag-in-editgridrow</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/formatter-and-select-tag-in-editgridrow/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on formatter and select tag in editGridRow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/formatter-and-select-tag-in-editgridrow#p13842</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/formatter-and-select-tag-in-editgridrow#p13842</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The job of the unformatter can be set in colModel, which you missed this.</p>
<p><a href="http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter" rel="nofollow" target="_blank"><a href="http://www.trirand.com/jqgridw" rel="nofollow">http://www.trirand.com/jqgridw</a>....._formatter</a></p>
</p>
<p>{name:&#39;ADHERENTS&#39;,index:&#39;ADHERENTS&#39;, width:colwidthBOOL, align:&#8221;center&#8221;, sortable:false, formatter: adherentsFmatter,&#160; <strong>unformat: adherentsUNFmatter</strong>, editable:true, edittype:&#39;select&#39;, editoptions: {value: adher_editSelOpts}, editrules:{}, searchoptions:{sopt:[&#39;eq&#39;], dataInit:function(elem) { $(elem).val(&#39;0&#39;);}}},</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 13 Jan 2010 18:05:45 +0200</pubDate>
        </item>
        <item>
        	<title>olaf on formatter and select tag in editGridRow</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/formatter-and-select-tag-in-editgridrow#p13761</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/formatter-and-select-tag-in-editgridrow#p13761</guid>
        	        	<description><![CDATA[<p>&#160;a field with 3 possible values : 0,1,2<br />&#160;<br />&#160;a colModel for this field :<br />&#160;<br />&#160;{name:&#39;ADHERENTS&#39;,index:&#39;ADHERENTS&#39;, width:colwidthBOOL, align:"center", sortable:false, formatter: adherentsFmatter,&#160; editable:true, edittype:&#39;select&#39;, editoptions: {value: adher_editSelOpts}, editrules:{}, searchoptions:{sopt:[&#39;eq&#39;], dataInit:function(elem) { $(elem).val(&#39;0&#39;);}}},</p>
<p>a editoptions =&#62; adher_editSelOpts :<br />var adher_editSelOpts = { 0 :"Non autoris&#233;", 1: "En consultation", 2: "En modification" };</p>
<p>formatter and unformatters :</p>
<p>function adherentsFmatter(cellvalue, options, rowObject){<br />&#160;&#160;&#160; switch (cellvalue) {<br />&#160;&#160;&#160; &#160;&#160; case &#39;0&#39;: html=&#39;&#39;; break;<br />&#160;&#160;&#160; &#160;&#160; case &#39;1&#39;: html=&#39;&#60;span class="icon-redmond-document"&#62;&#60;/span&#62;&#39;; break;<br />&#160;&#160;&#160; &#160;&#160; case &#39;2&#39;: html=&#39;&#60;span class="icon-redmond-edit"&#62;&#60;/span&#62;&#39;; break;<br />&#160;&#160;&#160; &#160;&#160; default: html=&#39;&#39;;<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return html;<br />}<br />function adherentsUNFmatter(cellvalue, options, cellobject){<br />&#160;&#160;&#160; var spanClass= jQuery(cellobject).children().eq(0).attr("class");<br />&#160;&#160;&#160; switch (spanClass) {<br />&#160;&#160;&#160; &#160;&#160; case &#39;icon-redmond-document&#39;: val=1; break;<br />&#160;&#160;&#160; &#160;&#160; case &#39;icon-redmond-edit&#39;: val=2; break;<br />&#160;&#160;&#160; &#160;&#160; default: val=0;<br />&#160;&#160;&#160; }<br />&#160;&#160;&#160; return val;<br />}</p>
<p>the formatter is OK in listmode and in viewmode;</p>
<p>in edit mode, the select tag is wrong against the value;</p>
<p>I think the unformatter function is no good; it&#39;s difficult to know where the unformatter do his work;</p>
<p>Thank you for any help.</p>
<p>Olivier.</p>
]]></description>
        	        	<pubDate>Mon, 11 Jan 2010 00:21:30 +0200</pubDate>
        </item>
</channel>
</rss>