<?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: drop down box</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/drop-down-box</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/drop-down-box/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>vmadadi on drop down box</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/drop-down-box#p19255</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/drop-down-box#p19255</guid>
        	        	<description><![CDATA[<p>Hi</p>
</p>
<p>I am using Java Script lib with own server side code.. using people code</p>
<p>i I am looking for some help with drop down box i am new to jqgrid... I  am using colmodel in the colmodel i set the edit type select and  populating the drop down box with a select from db... it is working  correctly.. the issue i am having is if i select a value and save ...on  page load the value is there but when i go to the column and click it  disappears... i need to set the value back if nothing is changed here is  my code</p>
<p>&#38;colModel = &#38;colModel &#124; "{name: &#39;coments&#39;,  index: &#39;coments&#39;,align: &#39;right&#39;, label: &#39;Comments&#39;, editable: true,  edittype: &#39;select&#39;, editoptions:{dataUrl:  &#39;/psc/ps/EMPLOYEE/EMPL/s/WEBLIB_T_DE_GRD.ISCRIPT1.FieldFormula.IScript_GetMeritCommentsSelect&#39;},   width: 220,  sortable: true, sorttype: &#39;text&#39;, resizable: false,  classes: &#39;columncolor&#39;},";</p>
<p>This is the HTML which is generated by this</p>
<p>&#60;select id="mySelect"&#62;<br />&#60;option value="default"&#62;&#38;nbsp;&#60;/option&#62;<br />&#60;option value="CON" id="C"&#62;Contract EMPLOYEE&#60;/option&#62;<br />&#60;option value="DEA" id="C"&#62;Employee Death&#60;/option&#62;<br />&#60;option value="LOA" id="C"&#62;Employee On Leave&#60;/option&#62;<br />&#60;option value="LSM" id="C"&#62;Lump Sum Merit&#60;/option&#62;<br />&#60;option value="MER" id="E"&#62;Merit Over Max, Mgr Approved&#60;/option&#62;<br />&#60;option value="NEW" id="C"&#62;Employee Too New in Job/Pos&#60;/option&#62;<br />&#60;option value="NGP" id="C"&#62;Non-Graded Position&#60;/option&#62;<br />&#60;option value="SAL" id="E"&#62;Salary Over Max, Mgr Approved&#60;/option&#62;<br />&#60;option value="TAD" id="C"&#62;Completing CMR via TAD&#60;/option&#62;<br />&#60;option value="TRM" id="C"&#62;Employee Termination&#60;/option&#62;   <br />&#60;/select&#62;</p>
<p>I have tried to set it to selected value </p>
<p> &#38;selSql = "SELECT A.T_CMR_COMMENTS , A.T_CMR_ELIGIBILITY, A.DESCR  FROM <a href="mailto:PS_T_CMRCOMMENT_VW@"" target="_blank">PS_T_CMRCOMMENT_VW@"</a> &#124; &#38;common.GetHCMDBName() &#124; " A ";</p>
<p> &#38;selSql = &#38;selSql &#124; "WHERE A.STATUS = &#39;A&#39; AND A.EFFDT = ( SELECT MAX(B.effdt) ";<br /> &#38;selSql = &#38;selSql &#124; "FROM <a href="mailto:PS_T_CMRCOMMENT_VW@"" target="_blank">PS_T_CMRCOMMENT_VW@"</a> &#124;  &#38;common.GetHCMDBName() &#124; " B " &#124; "WHERE B.T_CMR_COMMENTS =  A.T_CMR_COMMENTS)";<br /> &#38;Sql = CreateSQL();<br /> &#38;Sql.Open(&#38;selSql);</p>
<p> &#38;buildoptions = "&#60;select id=""commentselect""&#62;";<br /> &#38;buildoptions = &#38;buildoptions &#124; GetHTMLText(HTML.T_MSS_COMMENTS, " ", " ", " ");<br /> &#38;buildoptions = &#38;buildoptions &#124; GetHTMLText(HTML.T_MSS_COMMENTS, " ", " ");<br /> While &#38;Sql.Fetch(&#38;commentCode, &#38;eligCode, &#38;description);<br /> If &#38;thisValueAlreadySelected = &#38;commentCode Then</p>
<p> &#38;buildoptions = &#38;buildoptions &#124; "&#60;option value =""" &#124;  &#38;commentCode &#124; """selected= ""selected""" &#124; &#38;description &#124;  "&#60;/option&#62;";<br /> Else<br /> &#38;buildoptions =  &#38;buildoptions &#124; "&#60;option value =""" &#124; &#38;commentCode &#124; """&#62;"  &#124; &#38;description &#124; "&#60;/option&#62;";<br /> End-If;<br /> End-While;<br />&#38;buildoptions = &#38;buildoptions &#124; "&#60;/select&#62;";</p>
<p> %Response.Write(&#38;buildoptions);</p>
]]></description>
        	        	<pubDate>Mon, 23 Aug 2010 18:24:54 +0300</pubDate>
        </item>
</channel>
</rss>