Forum

July 12th, 2025
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
How to retain the new value from a SELECT ?
06/06/2010
21:32
Avatar
MarvinBanana
Edmonton, AB
Member
Members
Forum Posts: 4
Member Since:
29/05/2010
sp_UserOfflineSmall Offline

How to retain the new value from a SELECT ? 

I have been experimenting with the edittype 'select' in jqGrid.

The example http://www.trirand.com/blog/jq.....qgrid.html - Input Types works, except that the values selected are overwritten when you select a new row.
The restoreRow function overwrites the new value. 
If I comment out the restoreRow function, the value remains, but the select box is still visible, and the row remains selected.

I would like the new value to 'stick', but still want the select box to disappear and the row to visually lose focus (i.e. no longer highlighted).  

How should this be coded? I tried to add saveRow (see below) but it didn't work.

onSelectRow: function(Id){
                    if(Id && Id!==lastsel2){
                    
      
                    // saveRow : function(rowid, succesfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc)
                    jQuery('#list4').jqGrid('saveRow',Id); // did not work.
               
                     jQuery('#list4').jqGrid('restoreRow',lastsel2);
                    jQuery('#list4').jqGrid('editRow',Id,true);
                    lastsel2=Id; }
                },

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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