<?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: How to add color in a select field ?</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field</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/how-to-add-color-in-a-select-field/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>phicarre on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16715</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16715</guid>
        	        	<description><![CDATA[<p>Yes Tony, but the first idea was to build the data with the color, server side.</p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 16:48:20 +0300</pubDate>
        </item>
        <item>
        	<title>tony on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16683</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16683</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>The clear way IMHO (which work for me) is as follow:</p>
<p>Obtain your select via dataUrl option - the select can be something like this</p>
<p><input type='button' class='sfcodeselect' name='sfselectit844' value='Select Code' data-codeid='sfcode844' /></p>
<div class='sfcode' id='sfcode844'>
<p>&#60;select id="s1"&#62; <br />&#60;option class="red" value="1"&#62;2&#60;/option&#62; <br /> &#60;option class="blue" value="4"&#62;3&#60;/option&#62; <br /> &#60;option class="green" value="5"&#62;4&#60;/option&#62; <br /> &#60;/select&#62;</p>
</div>
<p>Then define in the css:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit2238' value='Select Code' data-codeid='sfcode2238' /></p>
<div class='sfcode' id='sfcode2238'>
<p>&#60;style&#62;</p>
<p>&#160;&#160;&#160; option.blue { color: blue;}<br />&#160;&#160; &#160;option.green {color: green;}<br />&#160;&#160; &#160;option.red {color:&#160; red;}</p>
<p>&#60;/style</p>
</div>
<p>Regards</p>
<p>Tony</p></p>
]]></description>
        	        	<pubDate>Mon, 26 Apr 2010 13:48:26 +0300</pubDate>
        </item>
        <item>
        	<title>phicarre on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16585</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p16585</guid>
        	        	<description><![CDATA[<p>Oups !</p>
<p>Not perfect because, after the selection in the listbox, the textbox is not filled !</p>
]]></description>
        	        	<pubDate>Wed, 21 Apr 2010 19:12:08 +0300</pubDate>
        </item>
        <item>
        	<title>phicarre on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15833</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15833</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>Perfect because no ":"&#160; ...</p>
<p>Thank you.</p>
<p>Maybe an improvement for future release <img class="spSmiley" style="margin:0" title="Confused" src="/blog/wp-content/forum-smileys/sf-confused.gif" alt="Confused" /></p>
]]></description>
        	        	<pubDate>Fri, 19 Mar 2010 13:13:54 +0200</pubDate>
        </item>
        <item>
        	<title>tony on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15813</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15813</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>This is not tested, but you can try to build the string like:</p>
</p>
<p>"item1:&#60;font color=&#39;red&#39;&#62;item1&#60;/font&#62;;item2:&#60;font color=&#39;green&#39;&#62;item1&#60;/font&#62;&#8230;."</p>
</p>
<p>Best regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Thu, 18 Mar 2010 13:31:43 +0200</pubDate>
        </item>
        <item>
        	<title>phicarre on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15811</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15811</guid>
        	        	<description><![CDATA[<p>I tried this:</p>
<p>Modification of the string by including a style:</p>
<p>"item1 style=&#39;color:red &#39;:item1;item2:item2;&#8230;itemn:itemn"</p>
<p>but jQGrid transforms this in:</p>
<p>&#60;option value="item1 style=&#39;color"&#62;red&#60;/option&#62;&#60;option value="&#39;"&#62;item1&#60;/option&#62; etc ...</p>
<p>because the : is a terminator !</p>
]]></description>
        	        	<pubDate>Thu, 18 Mar 2010 12:20:03 +0200</pubDate>
        </item>
        <item>
        	<title>phicarre on How to add color in a select field ?</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15704</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/how-to-add-color-in-a-select-field#p15704</guid>
        	        	<description><![CDATA[<p>A php script buids a list and the grid uses it like this:</p>
<p>var items= $.ajax(<br />&#160;&#160;&#160; {<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; url:&#39;listofitems.php&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; async:false<br />&#160;&#160;&#160; }).responseText;</p>
<p>The returned string has this structure:</p>
<p>"item1:item1;item2:item2;&#8230;itemn:itemn"</p>
<p>The column is defined like this:</p>
<p>{<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; name:&#39;reference&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; index:&#39;reference&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; edittype:&#39;select&#39;,<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; editoptions:{value:items},<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; editable:true&#160;</p>
<p>&#160;},</p>
<p>When the edit form is displayed I would like to see, for example, the odd items in red, the other ones in blue.</p>
<p>1) is it possible to "integrate" the color or the criteria in my script ?</p>
<p>2) and test in beforeshowform</p>
<p>Another solution is welcomed &#8230;</p>
]]></description>
        	        	<pubDate>Mon, 15 Mar 2010 16:42:04 +0200</pubDate>
        </item>
</channel>
</rss>