Forum
Topic RSS
21:32
29/05/2010
OfflineHow 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; }
},
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home