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
Edit - Listbox Items
21/08/2014
19:03
Avatar
hamerp
New Member
Members
Forum Posts: 2
Member Since:
21/08/2014
sp_UserOfflineSmall Offline

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,

21/08/2014
19:10
Avatar
hamerp
New Member
Members
Forum Posts: 2
Member Since:
21/08/2014
sp_UserOfflineSmall Offline

BTW I'm using jqGrid 4.6.0

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

Currently Online:
38 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