<?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: edittype:select not showing the labels</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/edittypeselect-not-showing-the-labels</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/edittypeselect-not-showing-the-labels/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>ledy on edittype:select not showing the labels</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edittypeselect-not-showing-the-labels#p23261</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edittypeselect-not-showing-the-labels#p23261</guid>
        	        	<description><![CDATA[<p>Hi,</p>
</p>
<p>Using the current version of jqgrid with the latest jquery library, I worry about my datagrid having some bugs. I compared each line with the demo/examples and manual, but cannot find out what&#39;s wrong.</p>
</p>
<p>I use edittype:select in the datagrid with some editoptions:{"shortID:Long Label;mo:re"}. When adding a new row or edit+save an existing one, the table is showing the "Long Label".</p>
<p>But by default, after loading the table, i can not see the labels, but the values, e.g. shortID instead of LongLabel.</p>
<p>Refresh/Reload does not help.</p>
</p>
<p>I suspect my load function to be the failure source:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit7379' value='Select Code' data-codeid='sfcode7379' /></p>
<div class='sfcode' id='sfcode7379'>&#160;&#160;&#160; var myData = ... ;//a javascript {&#34;1&#34;:{&#34;ruleid&#34;:&#34;1&#34;,...}}<br />&#160;&#160; &#160;$.each(myDatafunction(k,v)<br />&#160;&#160; &#160;{<br />&#160;&#160; &#160; &#160;&#160; &#160;jQuery(&#34;#rules-edit&#34;).jqGrid(&#39;addRowData&#39;,&#34;ruleid&#34;+v.ruleid,v);<br />&#160;&#160; &#160;});</div>
</p>
<p>Thanks for help.</p>
</p>
<p>PS: That&#39;s the entire source:</p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1366' value='Select Code' data-codeid='sfcode1366' /></p>
<div class='sfcode' id='sfcode1366'>&#60;script src=&#34;js/jquery.layout.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/js/i18n/grid.locale-en.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script type=&#34;text/javascript&#34;&#62;<br />&#160;&#160; &#160;$.jgrid.no_legacy_api = true;<br />&#160;&#160; &#160;$.jgrid.useJSON = true;<br />&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/js/ui.multiselect.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/js/jquery.jqGrid.min.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/js/jquery.tablednd.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/js/jquery.contextmenu.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;<br />&#60;script src=&#34;./js/jqgrid/plugins/jquery.searchFilter.js&#34; type=&#34;text/javascript&#34;&#62;&#60;/script&#62;</p>
<p>&#60;script&#62;<br />function datagrid_export(jqgrid_id)<br />{<br />&#160;&#160; &#160;return jQuery(&#34;#&#34;+jqgrid_id).jqGrid(&#39;jqGridExport&#39;,{exptype:&#39;jsonstring&#39;,jsonGrid : &#34;data&#34;});<br />}<br />&#60;/script&#62;<br />&#60;!--/datagrid--&#62;</p>
<p>&#60;div class=&#34;datagrid-box&#34;&#62;<br />&#60;table id=&#34;rules-edit&#34;&#62;&#60;/table&#62;<br />&#60;div id=&#34;rules-edit-pager&#34;&#62;&#60;/div&#62;</p>
<p>&#60;script&#62;<br />var jqgsel;<br />jQuery(&#34;#rules-edit&#34;).jqGrid({<br />&#160;&#160; &#160;datatype: &#34;local&#34;,<br />&#160;&#160; &#160;pager:&#34;#rules-edit-pager&#34;,<br />&#160;&#160; &#160;pgbuttons:false,<br />&#160;&#160; &#160;pginput:false,<br />&#160;&#160; &#160;rowNum:500,<br />&#160;&#160; &#160;sortname:&#34;ruleid&#34;,<br />&#160;&#160; &#160;sortorder: &#34;desc&#34;,<br />&#160;&#160; &#160;viewrecords: false,<br />&#160;&#160; &#160;autowidth: false,<br />&#160;&#160; &#160;hidegrid: false,<br />&#160; &#160;&#160;&#160; &#160;colNames:[&#39;RuleID&#39;,&#39;On&#39;],<br />&#160; &#160;&#160;&#160; &#160;colModel:[<br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;ruleid&#39;,index:&#39;ruleid&#39;,width:50,editable:false},<br />&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{name:&#39;active&#39;,index:&#39;active&#39;,width:30,editable:true,edittype:&#34;select&#34;,editoptions:{value:&#34;0:Off;1:On&#34;}}<br />&#160; &#160;&#160;&#160; &#160;],<br />&#160;&#160; &#160;afterInsertRow:function(rowid,rowdata,rowelem){<br />&#160;&#160; &#160;&#160;&#160; &#160;if(!rowdata.ruleid)<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;window.location.reload();<br />&#160;&#160; &#160;},<br />&#160;&#160; &#160;editurl: &#34;./?script=campaign&#38;sub=rules&#38;todo=save&#38;ajax=1&#34;,<br />&#160;&#160; &#160;caption: &#34;Test&#34;<br />});<br />jQuery(&#34;#rules-edit&#34;).jqGrid(&#39;navGrid&#39;,&#39;#rules-edit-pager&#39;,{del:false,add:true,edit:true,search:false})</p>
<p>$(function(){<br />&#160;&#160; &#160;var json_data ={&#34;1&#34;:{&#34;ruleid&#34;:&#34;1&#34;,&#34;active&#34;:&#34;0&#34;,&#34;ts&#34;:&#34;2011-05-20 13:37:50&#34;}};<br />&#160;&#160; &#160;$.each(json_data,function(k,v)<br />&#160;&#160; &#160;{<br />&#160;&#160; &#160; &#160;&#160; &#160;jQuery(&#34;#rules-edit&#34;).jqGrid(&#39;addRowData&#39;,&#34;ruleid&#34;+v.ruleid,v);<br />&#160;&#160; &#160;});<br />&#160;});<br />&#160;&#60;/script&#62;</p>
</div>
]]></description>
        	        	<pubDate>Fri, 20 May 2011 16:49:52 +0300</pubDate>
        </item>
</channel>
</rss>