Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
drop down box
23/08/2010
18:24
Avatar
vmadadi
New Member
Members
Forum Posts: 1
Member Since:
23/08/2010
sp_UserOfflineSmall Offline

Hi

I am using Java Script lib with own server side code.. using people code

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

&colModel = &colModel | "{name: 'coments', index: 'coments',align: 'right', label: 'Comments', editable: true, edittype: 'select', editoptions:{dataUrl: '/psc/ps/EMPLOYEE/EMPL/s/WEBLIB_T_DE_GRD.ISCRIPT1.FieldFormula.IScript_GetMeritCommentsSelect'}, width: 220, sortable: true, sorttype: 'text', resizable: false, classes: 'columncolor'},";

This is the HTML which is generated by this

<select id="mySelect">
<option value="default">&nbsp;</option>
<option value="CON" id="C">Contract EMPLOYEE</option>
<option value="DEA" id="C">Employee Death</option>
<option value="LOA" id="C">Employee On Leave</option>
<option value="LSM" id="C">Lump Sum Merit</option>
<option value="MER" id="E">Merit Over Max, Mgr Approved</option>
<option value="NEW" id="C">Employee Too New in Job/Pos</option>
<option value="NGP" id="C">Non-Graded Position</option>
<option value="SAL" id="E">Salary Over Max, Mgr Approved</option>
<option value="TAD" id="C">Completing CMR via TAD</option>
<option value="TRM" id="C">Employee Termination</option>
</select>

I have tried to set it to selected value

&selSql = "SELECT A.T_CMR_COMMENTS , A.T_CMR_ELIGIBILITY, A.DESCR FROM PS_T_CMRCOMMENT_VW@" | &common.GetHCMDBName() | " A ";

&selSql = &selSql | "WHERE A.STATUS = 'A' AND A.EFFDT = ( SELECT MAX(B.effdt) ";
&selSql = &selSql | "FROM PS_T_CMRCOMMENT_VW@" | &common.GetHCMDBName() | " B " | "WHERE B.T_CMR_COMMENTS = A.T_CMR_COMMENTS)";
&Sql = CreateSQL();
&Sql.Open(&selSql);

&buildoptions = "<select id=""commentselect"">";
&buildoptions = &buildoptions | GetHTMLText(HTML.T_MSS_COMMENTS, " ", " ", " ");
&buildoptions = &buildoptions | GetHTMLText(HTML.T_MSS_COMMENTS, " ", " ");
While &Sql.Fetch(&commentCode, &eligCode, &description);
If &thisValueAlreadySelected = &commentCode Then

&buildoptions = &buildoptions | "<option value =""" | &commentCode | """selected= ""selected""" | &description | "</option>";
Else
&buildoptions = &buildoptions | "<option value =""" | &commentCode | """>" | &description | "</option>";
End-If;
End-While;
&buildoptions = &buildoptions | "</select>";

%Response.Write(&buildoptions);

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
75 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information