<?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: Possible 'select' bug in 3.4</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34</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/possible-select-bug-in-34/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Possible 'select' bug in 3.4</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3956</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3956</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks - the fix is similar.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 14 Jan 2009 07:27:08 +0200</pubDate>
        </item>
        <item>
        	<title>phipps73 on Possible 'select' bug in 3.4</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3945</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3945</guid>
        	        	<description><![CDATA[<p>Hi Tony,</p>
<p>I have applied a patch to my code which appears to work - not sure if it is the best way to do it but here is the snip from grid.common.js:</p>
<p>case "select" :<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var so = options.value.split(";"),sv, ov;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; elem = document.createElement("select");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var msl =&#160; options.multiple === true ? true : false;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //added by Dave (phipps73@googlemail.com) - 12-01-2009<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; var sze = options.size === NaN ? 1 : options.size;<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //end of Dave mod<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //jQuery(elem).attr({id:options.id,name:options.name,size:Math.min(options.size,so.length), multiple:msl });&#160; removed by Dave (phipps73@googlemail.com) 12-01-2009<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //added by Dave (phipps73@googlemail.com) - 12-01-2009<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; jQuery(elem).attr({id:options.id,name:options.name,size:sze });<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if(msl) jQuery(elem).attr({multiple:&#39;multiple&#39;});<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; //end of Dave mod<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; for(var i=0; i&#60;so.length;i++){<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; sv = so[i].split(":");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; ov = document.createElement("option");<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; ov.value = sv[0]; ov.innerHTML = sv[1];<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if (!msl &#38;&#38;&#160; sv[1]==vl) ov.selected ="selected";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; if (msl &#38;&#38; jQuery.inArray(sv[1],vl.split(","))&#62;-1) ov.selected ="selected";<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; elem.appendChild(ov);<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; }<br />&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; break;</p>
<p>Hope this helps! Feel free to point out any glaring mistakes - my js skills are a little weak 😉</p>
<p>Cheers,</p>
<p>Dave</p>
]]></description>
        	        	<pubDate>Mon, 12 Jan 2009 16:43:54 +0200</pubDate>
        </item>
        <item>
        	<title>phipps73 on Possible 'select' bug in 3.4</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3941</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3941</guid>
        	        	<description><![CDATA[<p>Thanks Tony, I thought I was going mad! I upgraded the code to 3.4 and the selects all went a bit crazy!</p>
<p>What do I need to change to fix the bug? Or have you posted a patch for grid.common.js?</p>
<p>Cheers,</p>
<p>Dave</p>
]]></description>
        	        	<pubDate>Mon, 12 Jan 2009 12:35:24 +0200</pubDate>
        </item>
        <item>
        	<title>tony on Possible 'select' bug in 3.4</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3938</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3938</guid>
        	        	<description><![CDATA[<p>Hello Dave,</p>
<p>Thank you for this. You are right.</p>
<p>The right syntax for multiple is (have checked in w3schools&#160; 🙂 )</p>
<p>&#60;select name="nm" multiple="multiple"&#62;...</p>
<p>So it is quite possible that&#160; some browsers intrepret only the first multiple ignoring the value. Will correct this.</p>
<p>Also for the size you are rigth too. Fixed.</p>
<p>Thank&#39;s</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 12 Jan 2009 12:21:19 +0200</pubDate>
        </item>
        <item>
        	<title>phipps73 on Possible 'select' bug in 3.4</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3936</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/possible-select-bug-in-34#p3936</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I am just testing 3.4 and I have run into a possible problem with inline editing where a select is present. The inline form that appears displays a multiple select dropdown where it should just display a single select dropdown.</p>
<p>I couldn&#39;t see anything in the docs about any new parameters but I noticed a size argument in grid.common.js. Adding a size argument with a value of 1 gives a single select however it still displays as a multi select in a single select space. I think this line is the problem:</p>
<p>jQuery(elem).attr({id:options.id,name:options.name,size:Math.min(options.size,so.length), multiple:msl });</p>
<p>The multiple:msl is set to either true or false and translates to the following html:</p>
<p><span class="nodeLabelBox repTarget">&#60;<span class="nodeTag">select</span><span class="nodeAttr editGroup">&#160;<span class="nodeName editable">id</span>="<span class="nodeValue editable">3548_Status</span>"</span><span class="nodeAttr editGroup">&#160;<span class="nodeName editable">class</span>="<span class="nodeValue editable">editable</span>"</span><span class="nodeAttr editGroup">&#160;<span class="nodeName editable">name</span>="<span class="nodeValue editable">Status</span>"</span><span class="nodeAttr editGroup">&#160;<span class="nodeName editable">size</span>="<span class="nodeValue editable">NaN</span>"</span><span class="nodeAttr editGroup">&#160;<span class="nodeName editable">multiple</span>="<span class="nodeValue editable">false</span>"</span><span class="nodeBracket editable insertBefore">&#62;</span></span></p>
<p>Even when multiple is set to false, Firefox 3 on the Mac displays the select box as a multiple select. If msl = false then the multiple attribute of the select tag should be excluded. Also the default size should be 1 rather than NaN if size is not supplied as an argument.</p>
<p>Is this a genuine bug or am I missing something?</p>
<p>Cheers,</p>
<p>Dave</p></p>
]]></description>
        	        	<pubDate>Mon, 12 Jan 2009 10:47:36 +0200</pubDate>
        </item>
</channel>
</rss>