Forum
19:03
21/08/2014
Hi,
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 & the record associated is updated. If I then select another row from the grid & 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):
colModel:[
{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'}},
]
   editSettings = {
       recreateForm:false,
       jqModal:true,
       reloadAfterSubmit:true,
       closeOnEscape:true,
       savekey: [true,13],
       closeAfterEdit:true,
       afterShowForm:function(){
           $("#lui_"+grid[0].id).hide();
          Â
       },
       onclickSubmit:function(options,rowid)
       {
           var grid_id = grid[0].id,
           grid_p = grid[0].p,
           newPage = grid[0].p.page;
          Â
           // Call the script to delete the record
           grid.jqGrid('editGridRow',rowid,{url:'../cgi-bin/dashboardServer.pl',reloadAfterSubmit:false,editData:{subfunction:'updateStatus'}});
           $.jgrid.hideModal("#editmod"+grid_id,
                   {gb:"#gbox_"+grid_id,jqm:options.jqModal,onClose:options.onClose});
       if (grid_p.lastpage > 1) {// on the multipage grid reload the grid
           if (grid_p.reccount === 0 && newPage === grid_p.lastpage) {
               // if after deliting there are no rows on the current page
               // which is the last page of the grid
               newPage -= 1; // go to the previous page
           }
           // reload grid to make the row from the next page visable.
           grid.trigger("reloadGrid", [{page:newPage,status:intStatus,oper:'status',date:qryDate}]);
          Â
       }
       grid.trigger("reloadGrid", [{page:1,status:intStatus,oper:'status',date:qryDate}]);
     Â
       //return true;
       },
       processing:true
   },
.jqGrid('navGrid','#pager',{add:false,edit:true,del:false},editSettings,addSettings,delSettings,
Most Users Ever Online: 715
Currently Online:
46 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66