<?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: Grid with Select column bug on default Value</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/grid-with-select-column-bug-on-default-value</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/grid-with-select-column-bug-on-default-value/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ram2010 on Grid with Select column bug on default Value</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/grid-with-select-column-bug-on-default-value#p26952</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/grid-with-select-column-bug-on-default-value#p26952</guid>
        	        	<description><![CDATA[<p>Using JQGRID 4.2.0 there is a bug when setting the default selected value when a dropdown list is loaded in a grid.</p>
<pre>The reason for this is that in jQuery.jqGrid.js it uses the value to set selected in the dropdown list and not the text.

Replace
if (a.inArray(a.trim(a(this).text()), n) &#62; -1 &#124;&#124; a.inArray(a.trim(a(this).val()), n) &#62; -1) this.selected = "selected"
									
with:
if (a.inArray(a.trim(a(this).text()), n) &#62; -1){

Where the case "select" in the createEl function</pre>
<pre>This is a bug as the default value to be selected should ALWAYS be the text which appears in the grid before the row is selected.</pre>
<pre>Hopfully this can be fixed in future jquery grid releases.</pre>
]]></description>
        	        	<pubDate>Mon, 16 Jul 2012 14:55:20 +0300</pubDate>
        </item>
</channel>
</rss>