<?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: Edit - Listbox Items</title>
	<link>http://www.trirand.com/blog/?page_id=393/help/edit-listbox-items</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/edit-listbox-items/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>hamerp on Edit - Listbox Items</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-listbox-items#p31006</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-listbox-items#p31006</guid>
        	        	<description><![CDATA[<p>BTW I'm using jqGrid 4.6.0</p>
]]></description>
        	        	<pubDate>Thu, 21 Aug 2014 19:10:48 +0300</pubDate>
        </item>
        <item>
        	<title>hamerp on Edit - Listbox Items</title>
        	<link>http://www.trirand.com/blog/?page_id=393/help/edit-listbox-items#p31005</link>
        	<category>Help</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/help/edit-listbox-items#p31005</guid>
        	        	<description><![CDATA[<p>Hi,</p>
<p>I have a problem when I select a listbox item from an edit form following selecting the edit option on a jqGrid. The edit form displays the values loaded from a dataURL call and I can select the item from the dropdown listbox OK. When I post it, the value is sent to the server OK &#38; the record associated is updated. If I then select another row from the grid &#38; do the same, then instead of the selected value from the dropdown listbox being posted, the first value in the dropdown listbox is posted. If I manually refresh the screen, then it works OK again, but just for the first time I edit. Spent ages trying to work out why, but to no avail: Below the grid construct (parts of):</p>
<p>colModel:[</p>
<p>{name:'WF_STATUS', index:'STATUS', width:10, editable:true, editrules:required:true,edithidden:true}, hidden:true, edittype:'select', editoptions:{dataUrl:'../cgi-bin/dashboardServer.pl?oper=getStatuses'}},<br />
]</p>
<p>Â Â Â  editSettings = {<br />
Â Â Â Â Â Â Â  recreateForm:false,<br />
Â Â Â Â Â Â Â  jqModal:true,<br />
Â Â Â Â Â Â Â  reloadAfterSubmit:true,<br />
Â Â Â Â Â Â Â  closeOnEscape:true,<br />
Â Â Â Â Â Â Â  savekey: [true,13],<br />
Â Â Â Â Â Â Â  closeAfterEdit:true,<br />
Â Â Â Â Â Â Â  afterShowForm:function(){<br />
Â Â Â Â Â Â Â Â Â Â Â  $("#lui_"+grid[0].id).hide();<br />
Â Â Â Â Â Â Â Â Â Â  Â <br />
Â Â Â Â Â Â Â  },<br />
Â Â Â Â Â Â Â  onclickSubmit:function(options,rowid)<br />
Â Â Â Â Â Â Â  {<br />
Â Â Â Â Â Â Â Â Â Â Â  var grid_id = grid[0].id,<br />
Â Â Â Â Â Â Â Â Â Â Â  grid_p = grid[0].p,<br />
Â Â Â Â Â Â Â Â Â Â Â  newPage = grid[0].p.page;<br />
Â Â Â Â Â Â Â Â Â Â  Â <br />
Â Â Â Â Â Â Â Â Â Â Â  // Call the script to delete the record<br />
Â Â Â Â Â Â Â Â Â Â Â  grid.jqGrid('editGridRow',rowid,{url:'../cgi-bin/dashboardServer.pl',reloadAfterSubmit:false,editData:{subfunction:'updateStatus'}});</p>
<p>Â Â Â Â Â Â Â Â Â Â Â  $.jgrid.hideModal("#editmod"+grid_id,<br />
Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  {gb:"#gbox_"+grid_id,jqm:options.jqModal,onClose:options.onClose});<br />
Â Â  Â Â Â  Â Â  if (grid_p.lastpage &#62; 1) {// on the multipage grid reload the grid<br />
Â Â  Â Â Â  Â Â Â Â Â Â  if (grid_p.reccount === 0 &#38;&#38; newPage === grid_p.lastpage) {<br />
Â Â  Â Â Â  Â Â Â Â Â Â Â Â Â Â  // if after deliting there are no rows on the current page<br />
Â Â  Â Â Â  Â Â Â Â Â Â Â Â Â Â  // which is the last page of the grid<br />
Â Â  Â Â Â  Â Â Â Â Â Â Â Â Â Â  newPage -= 1; // go to the previous page<br />
Â Â  Â Â Â  Â Â Â Â Â Â  }<br />
Â Â  Â Â Â  Â Â Â Â Â Â  // reload grid to make the row from the next page visable.<br />
Â Â  Â Â Â  Â Â Â Â Â Â  grid.trigger("reloadGrid", [{page:newPage,status:intStatus,oper:'status',date:qryDate}]);<br />
Â Â  Â Â Â  Â Â Â Â Â  Â <br />
Â Â  Â Â Â  Â Â  }<br />
Â Â  Â Â Â  Â Â  grid.trigger("reloadGrid", [{page:1,status:intStatus,oper:'status',date:qryDate}]);<br />
Â Â  Â Â Â  Â <br />
Â Â  Â Â Â  Â Â  //return true;<br />
Â Â Â Â Â Â Â  },<br />
Â Â Â Â Â Â Â  processing:true<br />
Â Â Â  },</p>
<p>.jqGrid('navGrid','#pager',{add:false,edit:true,del:false},editSettings,addSettings,delSettings,</p>
]]></description>
        	        	<pubDate>Thu, 21 Aug 2014 19:03:57 +0300</pubDate>
        </item>
</channel>
</rss>