Forum


18:27

13/06/2009

Hi,
I have a couple of grids (both based on local arrays). When I add a new row to the first grid I populate the second with a numbers of rows of which one column is blank. I then use a editCell call to take the user to the first row in the second grid to enter a value.
$("#grid_2").editCell("0", "2", true,true);
That works fine.
What I want to do, and the bit I'm having trouble with, is that when the user has entered a value I want to move them down to edit the cell below (same col, row+1) and carry on doing this until they've done so for all rows.
I'm trying to do this in the afterSaveCell function - but it doesn't work. While I thought this might be due to some issue of how I add 1 to the row it doesn't work either if I do it this way...
afterSaveCell: function (rowid,name,val,iRow,iCol){
$("#grid_2").editCell("1", "2", true,true);
}
Any ideas as to what I'm doing wrong?
Thanks
Romyn
01:12

Moderators
30/10/2007

Hello,
Try this:
afterSaveCell: function (rowid,name,val,iRow,iCol){
setTimeout( function() { $(”#grid_2″).editCell(”1″, “2″, true,true);},50)
}
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
61 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