<?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: Cell Values when select is used</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used</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/cell-values-when-select-is-used/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p9459</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p9459</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks. Fixed. (not jet in GitHub)</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Tue, 08 Sep 2009 09:45:00 +0300</pubDate>
        </item>
        <item>
        	<title>jpalac on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p9421</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p9421</guid>
        	        	<description><![CDATA[<p>Tony,</p>
</p>
<p>Thanks for the new 3.5.3 version. The select option is now loading however when using getChangedCells I get the text value and not the id value of the selected column value. Is there a way to get the ID?</p>
</p>
<p>Thanks,</p>
</p>
<p>Jo</p>
]]></description>
        	        	<pubDate>Mon, 07 Sep 2009 23:18:32 +0300</pubDate>
        </item>
        <item>
        	<title>jpalac on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8909</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8909</guid>
        	        	<description><![CDATA[<p>Can you please give an estimate as to when that would be? Just want to make sure it will fit in with my timelines.</p>
</p>
<p>Regards,</p>
</p>
<p>Jo</p>
]]></description>
        	        	<pubDate>Fri, 21 Aug 2009 21:49:02 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8880</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8880</guid>
        	        	<description><![CDATA[<p>Hello Jo,</p>
<p>In this case you shoul wait for the next bugfix release.</p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Fri, 21 Aug 2009 03:28:50 +0300</pubDate>
        </item>
        <item>
        	<title>jpalac on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8826</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8826</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>Forgive my ignorance but I&#39;ve never used GitHub and I see that you&#39;ve made the changes in the individual</p>
<p>modules&#160;and I&#39;m not sure how to concatenate them into my one grid file.&#160;</p>
<p>(with 3.5 I understand all modules are included in the one file when downloaded from the new download manager)</p>
</p>
<p>Thanks,</p>
</p>
<p>Jo</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 19:15:18 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8813</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8813</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>Thanks for this. Fixed in GitHub.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 11:08:30 +0300</pubDate>
        </item>
        <item>
        	<title>markw65 on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8810</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8810</guid>
        	        	<description><![CDATA[<p>Not yet ready to test any of this, sorry, but I&#39;ve looked over the changes.</p>
</p>
<p>Not much to say, except that I think its doing more or less what /I/ will want (once I get there!).</p>
</p>
<p>A couple of observations:</p>
<p>In grid.celledit.js, lines 119 and following:</p>
<pre><div id="LC119" class="line">				<span class="nx">nm</span> <span class="o">=</span> <span class="nx">$t</span><span class="p">.</span><span class="nx">p</span><span class="p">.</span><span class="nx">colModel</span><span class="p">[</span><span class="nx">iCol</span><span class="p">].</span><span class="nx">name</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="o">,</span><span class="s2">"\\\\."</span><span class="p">);</span></div><div id="LC120" class="line">				<span class="nx">switch</span> <span class="p">(</span><span class="nx">$t</span><span class="p">.</span><span class="nx">p</span><span class="p">.</span><span class="nx">colModel</span><span class="p">[</span><span class="nx">iCol</span><span class="p">].</span><span class="nx">edittype</span><span class="p">)</span> <span class="p">{</span></div><div id="LC121" class="line">					<span class="nx">case</span> <span class="s2">"select"</span><span class="o">:</span></div><div id="LC122" class="line">						<span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="nx">$t</span><span class="p">.</span><span class="nx">p</span><span class="p">.</span><span class="nx">colModel</span><span class="p">[</span><span class="nx">iCol</span><span class="p">].</span><span class="nx">editoptions</span><span class="p">.</span><span class="nx">multiple</span><span class="p">)</span> <span class="p">{</span></div><div id="LC123" class="line">							<span class="nx">v</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">"#"</span><span class="o">+</span><span class="nx">iRow</span><span class="o">+</span><span class="s2">"_"</span><span class="o">+</span><span class="nx">nm</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="o">,</span><span class="s2">"\\\\."</span><span class="p">)</span><span class="o">+</span><span class="s2">"&#62;option:selected"</span><span class="o">,</span><span class="nx">$t</span><span class="p">.</span><span class="nx">rows</span><span class="p">[</span><span class="nx">iRow</span><span class="p">]).</span><span class="nx">val</span><span class="p">();</span></div><div id="LC124" class="line">							<span class="nx">v2</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">"#"</span><span class="o">+</span><span class="nx">iRow</span><span class="o">+</span><span class="s2">"_"</span><span class="o">+</span><span class="nx">nm</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="o">,</span><span class="s2">"\\\\."</span><span class="p">)</span><span class="o">+</span><span class="s2">"&#62;option:selected"</span><span class="o">,</span><span class="nx">$t</span><span class="p">.</span><span class="nx">rows</span><span class="p">[</span><span class="nx">iRow</span><span class="p">]).</span><span class="nx">text</span><span class="p">();</span></div><div id="LC125" class="line">						<span class="p">}</span> <span class="k">else</span> <span class="p">{</span></div><div id="LC126" class="line">							<span class="kd">var</span> <span class="nx">sel</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="s2">"#"</span><span class="o">+</span><span class="nx">iRow</span><span class="o">+</span><span class="s2">"_"</span><span class="o">+</span><span class="nx">nm</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s1">&#39;.&#39;</span><span class="o">,</span><span class="s2">"\\\\."</span><span class="p">)</span><span class="o">,</span><span class="nx">$t</span><span class="p">.</span><span class="nx">rows</span><span class="p">[</span><span class="nx">iRow</span><span class="p">])</span><span class="o">,</span> <span class="nx">selectedText</span> <span class="o">=</span> <span class="p">[];</span></div><div id="LC127" class="line">							<span class="nx">v</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="nx">sel</span><span class="p">).</span><span class="nx">val</span><span class="p">();<br /><br />Im not sure - but those three nm.replace(</span><span class="s1">&#39;.&#39;</span><span class="o">,</span><span class="s2">"\\\\."</span><span class="p">)</span> look wrong, given the definition of nm...<br /><br />Also, this looks wrong:<br /><pre>if($t.p.colModel[iCol].formatter&#160;&#38;&#38;&#160;$t.p.colModel[iCol]&#160;==&#160;&#39;select&#39;)&#160;v2&#160;=&#160;v;<br /></pre>
<pre><br />Note that $t.p.colModel[iCol] is an object, so its not likely to compare == &#39;select&#39;.<br /><br />Not sure if you meant to check edittype (which would be redundant, you&#39;ve already switched on it) or formatter (which I think would be too restrictive - what about custom formatters?).<br /><br />I think the correct check is just that it *has* a formatter (ie drop the &#38;&#38;...).<br /><br />Mark</pre>
</p>
</div>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 10:59:47 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8791</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8791</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I just posted the update to the GitHub - could you please check it and let me known what is. Also I have added unformat select which should do the job.</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Wed, 19 Aug 2009 06:25:07 +0300</pubDate>
        </item>
        <item>
        	<title>jpalac on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8758</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8758</guid>
        	        	<description><![CDATA[<p>Hi - I&#39;m having the same problem in celledit mode - would greately appreciate a solution.</p>
</p>
<p>Thanks,</p>
<p>Jo</p>
]]></description>
        	        	<pubDate>Tue, 18 Aug 2009 18:28:17 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8757</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8757</guid>
        	        	<description><![CDATA[<p>BTW,&#160; I temporarily added this hack at about line 38 in grid.inlinedit.js to return the value (rather that the text) if the column type is a &#39;select&#39;:</p>
</p>
<p>$(this).append(elc);<br />//elc has what we want when the format type is "select".&#160; Use that value instead<br />&#160;if({colModel:$t.p.colModel[i]}.colModel.formatter == "select")<br />&#160; svr[nm]=elc.value;<br />&#160;//Agin IE<br />if($t.p.colModel[i].edittype == "select" &#38;&#38; $t.p.colModel[i].editoptions.multiple===true &#38;&#38; $.browser.msie) {</p>
</p>
<p>I am sure there is a better way, but this is working for now.</p></p>
]]></description>
        	        	<pubDate>Tue, 18 Aug 2009 17:14:21 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8698</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8698</guid>
        	        	<description><![CDATA[<p>Thanks.&#160; I&#39;ll look forward to tryng them out</p>
]]></description>
        	        	<pubDate>Mon, 17 Aug 2009 08:38:55 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8681</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8681</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>I have made some changes for the selects including adding a unformat for the select. Will publish this in GitHub soon.</p>
<p>Best Regards</p>
]]></description>
        	        	<pubDate>Mon, 17 Aug 2009 07:15:46 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8645</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8645</guid>
        	        	<description><![CDATA[<p>Thanks Tony.&#160; I had read the documentation but it is pretty extensive and the initial read on formatter didn&#39;t seem to fit.&#160; But those&#160; changes did make the select work like I expected. That introduced a new problem with the &#39;savedRow&#39; data.&#160; I use &#39;savedRow&#39; to retrieve saved row so I can pass it to my .saverow function so I can compare the "before" and "after" values in the row:</p>
<p>var mySavedRow = $(&#39;#subBE&#39;).getGridParam(&#39;savedRow&#39;);</p>
<p>But &#39;savedRow&#39; now contains the text of the cell than the key value.&#160; In the example above, if I selected "Tony" the key value in the cell should be "3" and the "3" should be passed as the "savedRow" value.&#160; But I see "Tony" instead.&#160; I read through the formatter docs but this looks like something the grid should handle.&#160; I reverted my code changes back to the original but I still get the text of the cell in the "savedRow" parameter rather than the key value.</p>
</p>
<p>Did I miss something or do I need to use a different approach?</p>
<p>Thanks again.</p></p>
]]></description>
        	        	<pubDate>Sat, 15 Aug 2009 21:07:42 +0300</pubDate>
        </item>
        <item>
        	<title>tony on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8627</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8627</guid>
        	        	<description><![CDATA[<p>Hello,</p>
<p>You do not need to change the code. There is a special option for this purpose in 3.4 and in 3.5 - you just need to read the docs.</p>
<p>colModel :[</p>
<p>{...... formatter:&#39;select&#39;...}</p>
<p>....</p>
<p>]</p>
<p>Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Sat, 15 Aug 2009 03:05:04 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8599</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8599</guid>
        	        	<description><![CDATA[<p>This is a bug I think.&#160; I have been looking at code and debugging for a couple of hours and narrowed it down to this code in grid.common.js (3.4.4)</p>
<p>At around line 191 is a line that has the following:</p>
<p>if (!msl &#38;&#38;&#160; oSv[key]==vl){ ov.selected ="selected"};</p>
<p>oSv[key] returns the text, not the value of the hash key so if you change it to this:</p>
<p>if (!msl &#38;&#38;&#160; key==vl){ ov.selected ="selected"};</p>
<p>Then the code works correctly.</p>
</p>
<p>Check my assumptions though.&#160; I am not a very strong javascript programmer.&#160; But it IS working for me not.&#160; When I click on the drop down, it positions to the initial value correctly.</p></p>
]]></description>
        	        	<pubDate>Fri, 14 Aug 2009 20:34:08 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8598</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8598</guid>
        	        	<description><![CDATA[<p>Anyone?</p>
</p>
<p>Juan posted what I think was a similar issue in his post "trying to create to dependant dropdowns".&#160; I kind of got lost in all the code though.</p>
</p>
<p>This seems to be pretty standard requirement:</p>
<p>When you select a value from a dropdown, it retrieves the id value.&#160; When you trigger a dropdown it should postion to the id value rather than the cell value.</p>
</p>
<p>If I am doing something incorrect, let me know.&#160; In the example above, selecting "Tony" from the dropdown list stores "3" in the cell and displays "Tony".&#160; I just want the reverse of that to be true as well: I want the select list to position to the "3" value but display "Tony" in the cell.</p>
</p>
<p>Ideas?</p>
]]></description>
        	        	<pubDate>Fri, 14 Aug 2009 17:50:27 +0300</pubDate>
        </item>
        <item>
        	<title>Pete on Cell Values when select is used</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8481</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/cell-values-when-select-is-used#p8481</guid>
        	        	<description><![CDATA[<p>I have a grid that has drop down lists for each of the cells in the row.&#160; The primary issue I have is that the value of the selected option should be different that the actual description that displays in the list.&#160; For example You might have a list of employees like this:</p>
<p>&#60;select&#62;<br /> &#160;       &#60;option value="1"&#62;Bob&#60;/option&#62;<br /> &#160;       &#60;option value="2"&#62;John&#60;/option&#62;<br /> &#160;       &#60;option value="3"&#62;Tony&#60;/option&#62;<br /> &#160;       &#60;option value="4"&#62;Ralph&#60;/option&#62;<br /> &#60;/select&#62;</p>
</p>
<p>If the cell contained the value "3", then when I click on the drop down, it should position it to "Tony" (value 3).&#160; Instead, it positions it at the first value.</p>
</p>
<p>I load the grid with the *values* that correspond to the descriptions (eg 1,2,3,4) and I want the grid to position to the correct option in the list.&#160; But, it doesn&#39;t.&#160; The only time that the list positions to the correct value is when I have BOTH the value and description match.&#160; Like this:</p>
<p>&#60;select&#62;<br /> &#160;       &#60;option value="1"&#62;1&#60;/option&#62;<br /> &#160;       &#60;option value="2"&#62;2&#60;/option&#62;<br /> &#160;       &#60;option value="3"&#62;3&#60;/option&#62;<br /> &#160;       &#60;option value="4"&#62;4&#60;/option&#62;<br /> &#60;/select&#62;</p>
<p>Then if the cell has the value of 3, when the drop down list is triggered, it is already positioned at "3" in the list.</p>
<p>I set the drop down lists using the setColProp method:<br />&#160;.setColProp(&#39;emp&#39;,{edittype:"select",editoptions:employees})</p>
<p>In this case, the variable employees contains the name:value pairs of the employees.</p>
<p>Am I doing something wrong here?&#160; Positioning the list to the value, rather than the description of the select options seems like the practical way to have this work but I can&#39;t seem to make it work.&#160; I always have to have the option value and option description match the value in the cell.</p>
<p>Ideas? Suggestions?</p>
<p>Thanks</p></p>
]]></description>
        	        	<pubDate>Wed, 12 Aug 2009 17:46:56 +0300</pubDate>
        </item>
</channel>
</rss>